fix(intelligence): soft mark forgotten memories - #984
Conversation
|
@wayyoungboy The four-path alignment in this PR is correct. While reviewing, we traced the full lifecycle of the forget marker and found a broader architectural gap worth discussing. What this PR fixesBefore #282, all four intelligence-plugin paths hard-deleted memories. #282 fixed only The write/read gapWhen a memory is soft-marked, two fields are written to storage: However, a full-text search of the codebase shows these fields are written but never read by any component:
The same gap exists for The Ebbinghaus lifecycle: four signals, two consumersThe promotion/archival signals have a consumer ( Suggested next stepsThe soft-mark fix in this PR is a necessary first step, but the forget mechanism becomes meaningful only when a reader exists. Two natural follow-ups:
These are outside the scope of this PR but worth tracking as follow-up issues. |
|
Review update: no blocking issues found in this PR. I agree with the new comment that Local verification: PYTHONPATH=src pytest tests/unit/test_intelligence_forget_soft_mark.py -q
# 3 passed
git diff --check
# passed |
|
Thanks @wayyoungboy for the thorough analysis. Agreed — this PR closes the consistency gap, and the filter/GC follow-up is tracked separately. Merging. |
Co-authored-by: LINxiansheng <LINxiansheng@users.noreply.github.com>
Summary
This PR completes the intelligent-forgetting soft-mark behavior introduced for Memory.get() in #282.
When EbbinghausIntelligencePlugin returns delete_flag=True, memories should be marked as forgotten instead of being physically removed from storage. The sync Memory.get() path already does this, but Memory.search(), AsyncMemory.get(), and AsyncMemory.search() still called delete_memory / delete_memory_async.
Changes
Test plan