|
Fix memory system bugs: deterministic summary id, skip legacy extraction
- _summary.py: replace non-deterministic hash() with zlib.crc32 so summary id stays stable across server restarts, preventing duplicate summary rows. - extractor.py: skip memory extraction for legacy sessions (user_id=None) — ON CONFLICT(user_id, category, key) does not catch NULL duplicates in PostgreSQL (NULL != NULL). - sessions.py: _process_stale_sessions skips legacy sessions. - _facts.py: remove dead code (user_clause/user_param variables). - test_extractor.py: add user_id to test sessions + new test for legacy session skip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
|---|
|
|
| navi/api/routes/sessions.py |
|---|
| navi/memory/_facts.py |
|---|
| navi/memory/_summary.py |
|---|
| navi/memory/extractor.py |
|---|
| tests/unit/memory/test_extractor.py |
|---|