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

@@ -210,7 +210,7 @@ def list_recent_stories_for_evidence_sync(
query: str | None = None,
limit: int = 5,
) -> list[Story]:
"""同步会话版 `list_recent_stories_for_evidence`Celery / retrieve_evidence_sync)。"""
"""同步会话版 `list_recent_stories_for_evidence`非 memory evidence 主链)。"""
stmt = select(Story).where(Story.user_id == user_id).where(Story.status == "active")
q = (query or "").strip()
if q: