Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent e5c99a5eee
commit 6ee6502010
2050 changed files with 538359 additions and 57745 deletions
+15
View File
@@ -0,0 +1,15 @@
from src.memory import MemoryManager
def test_extract_memory_from_chat_skips_non_dict_messages(tmp_path):
# chat_history rows can be malformed (a non-dict slipping in from a partial
# session blob); the old loop did msg.get(...) and crashed on the first one.
m = MemoryManager(str(tmp_path))
history = [
{"role": "assistant", "content": "- remember to buy milk"},
"junk-msg",
None,
{"role": "user", "content": "hi"},
]
out = m.extract_memory_from_chat(history)
assert any(e["text"] == "remember to buy milk" for e in out)