Skip to content

feat: staleness-aware memory pruning for built-in memory (Closes #447)#484

Closed
Lexus2016 wants to merge 2 commits into
mainfrom
evolution/issue-447-staleness-aware-pruning
Closed

feat: staleness-aware memory pruning for built-in memory (Closes #447)#484
Lexus2016 wants to merge 2 commits into
mainfrom
evolution/issue-447-staleness-aware-pruning

Conversation

@Lexus2016

Copy link
Copy Markdown
Owner

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.

Hermes Evolution 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>
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: evolution/issue-447-staleness-aware-pruning vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11215 on HEAD, 11215 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5898 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@Lexus2016

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant