M3a:息壤三级记忆域——归真触发提取管线/白名单明忆/重忆确认/正影版本链/删除墓碑/双通道召回注入,退役旧记忆-抽取-反思-大周天-演化管线(迁移 004,验收 7 用例)

This commit is contained in:
chenxin committed 2026-08-27 09:16:32 +08:00
1 parent 2a640a901b
commit 9c98c2f85e
69 files changed
+1193 -6033

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ from sqlalchemy import func, select
from sqlalchemy.ext.asyncio import AsyncSession
from app.models.character import Character
from app.models.memory import Memory
from app.models.xirang import Memory
async def get_active_character(session: AsyncSession, owner_scope: str) -> Character | None:
@@ -98,7 +98,7 @@ async def count_memories(session: AsyncSession, character_id: str) -> int:
await session.execute(
select(func.count())
.select_from(Memory)
.where(Memory.character_id == character_id, Memory.deleted_at.is_(None))
.where(Memory.character_id == character_id, Memory.status != "tombstoned")
)
).scalar_one()
return int(total or 0)