fix(memory): 4 holographic memory bug fixes (#14024 #17899 #17350 #22907)#23221
Closed
dusterbloom wants to merge 1 commit into
Closed
fix(memory): 4 holographic memory bug fixes (#14024 #17899 #17350 #22907)#23221dusterbloom wants to merge 1 commit into
dusterbloom wants to merge 1 commit into
Conversation
ec027db to
4010e2a
Compare
Contributor
Author
|
@alt-glitch Rebased onto latest This PR fixes 4 open bugs in the holographic memory plugin that have been open for months:
All 4 issues are still open and affecting users. Ready for review. |
Fixes NousResearch#14024, NousResearch#17899, NousResearch#17350, NousResearch#22907 1. FTS5 query sanitization (NousResearch#14024, NousResearch#21102) - Hyphenated tokens (pve-01, lxc-103) no longer crash FTS5 MATCH - Three-tier fallback: quoted AND -> quoted AND retry -> OR - Handles C++, field:value, AND/OR/NOT operators, wildcards 2. retrieval_count increment (NousResearch#17899) - FactRetriever.search() now increments retrieval_count for returned facts, previously always stuck at 0 3. numpy degradation warning (NousResearch#17350) - initialize() logs WARNING when numpy is missing - system_prompt_block() includes visible WARNING so the agent knows HRR operations are disabled 4. auto_extract structured extraction (NousResearch#22907) - Removed noisy 'I like/love/want/need' patterns - Extracts clean declarative facts from captured groups: 'prefers dark mode over light mode' instead of raw message dump - 200 char cap, one fact per message, assistant messages ignored Tests: 41 new tests including 21 fuzz edge cases, all passing. End-to-end verified against real memory_store.db.
4010e2a to
d3adb7b
Compare
This was referenced May 29, 2026
This was referenced Jun 5, 2026
Contributor
Author
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.
Summary
Four bug fixes for the holographic memory plugin, all reported and validated by the community.
1. FTS5 query sanitization (#14024, #21102)
Hyphenated tokens (
pve-01,lxc-103) crashed FTS5 MATCH with "no such column" errors. The unicode61 tokenizer treats-as a column filter operator.Fix:
_sanitize_fts_query()splits on hyphens/punctuation and double-quotes each token. Three-tier fallback: quoted AND → quoted AND retry → OR. Also handlesC++,field:value,AND/OR/NOT, wildcards, SQL injection attempts.2. retrieval_count never incremented (#17899)
FactRetriever.search()bypassedstore.search_facts(), the only place that bumped the counter. The field was always 0.Fix: Increment
retrieval_countfor returned facts directly inFactRetriever.search(), with silent error handling.3. Silent numpy degradation (#17350)
When numpy was missing, HRR operations silently fell back to FTS5-only. No warning, no
hermes doctordetection. Users had no idea probe/reason/contradict were degraded.Fix:
initialize()logs a WARNING.system_prompt_block()includes a visible WARNING so the agent (and user) know HRR is disabled.4. auto_extract saves raw messages (#22907)
The regex patterns matched "I like / I want / I need" and dumped the entire user message verbatim as a fact. "I like that, sounds good" became a stored fact.
Fix: Removed noisy "like/love/want/need" patterns. Remaining patterns extract captured groups into clean declarative statements:
"prefers dark mode over light mode"instead of"I prefer dark mode over light mode, can you set it up?". 200 char cap, one fact per message, assistant messages skipped.Test plan
tests/plugins/memory/test_holographic_fixes.pytests/plugins/memory/passingmemory_store.db:pve-01,pihole-02,lxc-103searches: 1 result each (was crashing)retrieval_countincremented on search