Route all memory ingest/retrieve/enrichment/compaction through async MemoryService. Remove legacy sync memory implementations (ingest/retrieve/compaction); Celery and memoir Phase2 call asyncio.run into MemoryService-backed helpers. Memoir Phase1 batch ingest uses MemoryService.ingest_transcripts_batch; drop chapters. evidence_bundle_json mirror (Alembic 0015). Evaluation uses snapshot/link-only bundles; raise EvidenceClosureMissing instead of partial/fallback lineage tiers. Split memoir state into NarrativeCoverageState and InterviewControlState; delete the _interview_meta_store adapter layer. Remove rolling-query and recent-fact fallback settings from config and evidence assembly. Update judges, docs, tests, and PlaygroundPage alignment. Made-with: Cursor
953 B
953 B
回忆录可追溯证据
Library artifact 评测只接受严格证据闭包。
严格闭包
- Chapter:必须有
chapters.current_evidence_snapshot_id指向的chapter_evidence_snapshots行,且同时包含可绑定 transcript 的segment_ids与至少一类 memory evidence id。 - Story:必须有
StoryEvidenceLink,且能绑定到 transcript segments。 - 缺闭包时,
EvalTraceService抛EvidenceClosureMissing;不再拼接最近会话全文或从旧 JSON 镜像补齐。
Phase C 表
chapter_evidence_snapshots:一行对应一次物化闭包,version_no递增。chapter_evidence_links:按当前快照整批替换章节侧结构化 evidence id。chapters.current_evidence_snapshot_id是章节评测唯一入口。
Synthetic vs Library
- Synthetic replay 只评估重放 transcript,不绑定用户库 memory。
- Library chapter/story 使用严格闭包;缺闭包即不可评测。