feat(api)!: memory single chain — async MemoryService, strict eval closure

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
This commit is contained in:
Kevin
2026-04-30 14:11:46 +08:00
parent ac436b87a2
commit 71fbd39e32
53 changed files with 953 additions and 2448 deletions

View File

@@ -246,7 +246,7 @@ def _build_memoir_judge_prompt(
"【证据与输入顺序】以下区块按优先级给出:"
"评审说明(若有)→ 原始访谈/对话证据segment 绑定)→ 结构化记忆证据chunk/fact/timeline/summary"
"→ 参考基线(若有)→ 待评成稿。**真实性、覆盖率、可追溯性以「artifact 绑定证据闭包」为准**"
"存在 `lineage_tier=fallback` 或证据不足,须保守打分并写 `insufficient_evidence`。",
"若证据不足,须保守打分并写 `insufficient_evidence`。",
"",
]
ev_cap = max(1, int(settings.eval_judge_memoir_evidence_max_chars))