feat: staleness-aware memory pruning for built-in memory (Closes #447)#484
Closed
Lexus2016 wants to merge 2 commits into
Closed
feat: staleness-aware memory pruning for built-in memory (Closes #447)#484Lexus2016 wants to merge 2 commits into
Lexus2016 wants to merge 2 commits into
Conversation
added 2 commits
June 23, 2026 14:09
- Add a per-profile memory_index.json sidecar tracking added_at, last_recall, and recall_count for each entry. - Search now bumps recall metadata so frequently-used facts stay fresh. - Add memory(action='prune') with scan/remove modes and max_remove. - Lightweight contradiction detection surfaces review-worthy pairs. - High-confidence facts are retained; low-trust/unrecalled entries are pruned first. - Includes tests for scan/remove, recall metadata, index lifecycle, contradiction flagging, and legacy bootstrap. Closes #447 Co-Authored-By: Hermes Evolution <evolution@hermes.ai>
Contradictions are surfaced for review, matching the issue #447 success criterion that contradictory facts are flagged rather than silently removed. Also corrects the scan test example to reliably trigger the contradiction detector. Co-Authored-By: Hermes Evolution <evolution@hermes.ai>
Contributor
🔎 Lint report:
|
Owner
Author
|
Closing this implementation — CI is red on a real schema mismatch (tests/tools/test_memory_tool_schema.py still expects the memory action enum without the new '''prune''' value), so it needs rework before merge. A detailed, actionable brief has been posted on #447. |
4 tasks
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.
Automated evolution PR for issue #447.\n\nAdds a lightweight freshness heuristic and a memory(action='prune') tool action to scan or remove stale entries from built-in MEMORY.md / USER.md. Keeps high-confidence facts and surfaces contradictions for review.