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

-41
View File
@@ -214,47 +214,6 @@ async def test_world_entities_crud(client: AsyncClient) -> None:
assert gone.status_code in (200, 404)
@pytest.mark.asyncio
async def test_memory_list_with_filters(client: AsyncClient) -> None:
"""记忆列表支持类型/来源过滤——覆盖 services/memory.list_memory_page 路径。"""
m1 = await client.post(
"/api/v1/memory",
json={
"type": "observation",
"title": "观测记忆",
"content": "一条观测记忆",
"source": "observation",
},
)
assert m1.status_code == 200
m2 = await client.post(
"/api/v1/memory",
json={
"type": "reflection",
"title": "反思记忆",
"content": "一条反思记忆",
"source": "reflection",
},
)
assert m2.status_code == 200
# 按类型过滤
obs = await client.get("/api/v1/memory?type=observation")
assert obs.status_code == 200
assert all(item["type"] == "observation" for item in obs.json()["items"])
# 按来源过滤
ref = await client.get("/api/v1/memory?source=reflection")
assert ref.status_code == 200
assert all(item["source"] == "reflection" for item in ref.json()["items"])
# 总量 >= 2
all_mem = await client.get("/api/v1/memory")
assert all_mem.status_code == 200
assert all_mem.json()["total"] >= 2
@pytest.mark.asyncio
async def test_safety_policy_crud(client: AsyncClient) -> None:
"""安全策略 CRUD——覆盖 services/governance 部分路径。"""