#!/usr/bin/env python3 """直接检查 manifest 中的 pending items""" import sys sys.path.insert(0, '.') from src.manifest_manager import ManifestManager # 加载 manifest manifest = ManifestManager("cache/manifests/Empire of AI Dreams and Nightmares in Sam Altmans OpenAI (Karen Hao)_chinese_manifest.json") manifest.load() # 获取 pending items(这是 create_chunks_from_manifest 内部调用的) pending_items = manifest.get_items(status="pending") print(f"Pending items: {len(pending_items)}") # 如果没有 pending,获取所有 if not pending_items: print("No pending items, getting all...") pending_items = manifest.get_items() print(f"All items: {len(pending_items)}") # 检查前 10 个 item for item in pending_items[:10]: twp = item.text_with_placeholders has_phi = 'φ' in twp if twp else False inner_ph = {k: v for k, v in item.placeholder_map.items() if not k.startswith('_')} if item.placeholder_map else {} print(f"\n{item.global_id}:") print(f" status: {item.status}") print(f" clean_text: '{item.clean_text[:40]}...'") print(f" text_with_placeholders: '{twp[:40] if twp else 'EMPTY'}...'") print(f" has φ: {has_phi}") print(f" inner_placeholders: {list(inner_ph.keys())}")