fix(memory): avoid re-archiving recent history

This commit is contained in:
chengyongru
2026-08-19 18:40:20 +08:00
committed by chengyongru
parent f13abe0806
commit cc07ac1e12
2 changed files with 3 additions and 0 deletions
@@ -20,6 +20,8 @@ Marks (choose the best match):
Priority: user corrections and preferences > solutions > decisions > events > environment facts. The most valuable memory prevents the user from having to repeat themselves.
Do not output facts already present in the system prompt's Recent History. Those facts have already been archived.
Do not mark something [skip] merely because it might already exist in long-term memory; Dream handles cross-file deduplication later.
Output concise bullet points only. No preamble, no commentary.
+1
View File
@@ -240,6 +240,7 @@ class TestConsolidatorPromptContract:
for mark in ("[permanent]", "[durable]", "[ephemeral]", "[correction]", "[skip]"):
assert mark in prompt
assert "check context below" not in prompt.lower()
assert "Do not output facts already present in the system prompt's Recent History" in prompt
assert "Do not mark something [skip] merely because it might already exist" in prompt
class TestConsolidatorArchiveErrorHandling: