Repository navigation
fix(storage): repair recall hybrid union, feedback scoring, UTC decay, consolidation, and maintenance - #91
Open
michael-denyer wants to merge 1 commit into
Open
michael-denyer wants to merge 1 commit into
michael-denyer wants to merge 1 commit into
Conversation
…olidation, and maintenance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Address all retrieval, feedback, consolidation, and retention defects in memory-mcp so the hot cache and recall loop stay accurate and bounded over time.
What changed
Storage.recalland score FTS hits monotonically without penalizing strong vector similarity.retrieved_countincrements inrecord_retrieval_event.utility_scoreand scope injections byproject_idinmark_used_memories.get_recent_recallsandpredict_next_memoriesbyproject_idinsideget_hot_cache.Storage._detect_contradictionswith_looks_like_contradictionso elaborations are not markedcontradicts.utc_nowandensure_utcto match SQLiteCURRENT_TIMESTAMP._merge_with_existingproject-scoped hashing andvec0delete-then-insert; protect pinned memories, scope projects, reuse stored vectors via matrix multiply, and repoint edges inConsolidationMixin.Storage.maintenanceand throttle Stop-hook maintenance viarun_periodic_hook_maintenance.Scope
Storage search, retrieval, predictions, injection tracking, hot cache, memory CRUD, consolidation, maintenance, CLI Stop hook, and regression tests in
tests/test_bug_regressions.py.Tradeoffs
mark_used_memoriesscopes byproject_idrather thansession_idbecause the MCP server generates its own session UUID separately from Claude Code hooks.Blast Radius
Existing recall ranking, hot-cache slot selection, consolidation behavior, and
db_maintenanceoutput gain new fields with zero-default backwards compatibility inMaintenanceResponse.Verification
pytest -q: 466 passed, 1 skipped on this branch (476 passed, 1 skipped at stack tip), including 7 new regression tests inTestPR1RetrievalAndFeedbackFixes.ruff check src/ tests/andruff format --check src/ tests/: passed.