fix: use 'patterns' namespace consistently in hooks-tools (fixes #1136)#1183
fix: use 'patterns' namespace consistently in hooks-tools (fixes #1136)#1183ripgtxgt wants to merge 1 commit intoruvnet:mainfrom
Conversation
|
Hi team 👋 Just checking in — any updates on this one? Happy to make adjustments if needed. Thanks! |
mixingchex
left a comment
There was a problem hiding this comment.
APPROVE — Reviewed via hive-mind swarm analysis.
All 4 changes are correct and necessary. The singular 'pattern' namespace caused silent data loss: patterns stored via intelligence hooks were invisible to memory search/list which uses 'patterns' (plural).
Grep confirms no remaining instances of the incorrect singular namespace.
Suggestions (non-blocking):
- Extract
'patterns'to a shared constant to prevent future drift - Add regression test for namespace consistency
…et#1136) hooks-tools.ts used singular 'pattern' as the memory namespace in 4 locations while the rest of the codebase (workers/index.ts, reasoningbank, README examples) uses 'patterns' (plural). This caused a silent data loss bug: intelligence hooks stored patterns in namespace 'pattern', but memory_search and memory_list looked in 'patterns', making all stored pattern entries invisible to normal memory operations. Changed: - namespace: 'pattern' → namespace: 'patterns' - default || 'pattern' → default || 'patterns' - description string updated to reflect correct default
77dae54 to
b574247
Compare
|
Rebased onto current main (force-pushed). The branch was conflicting because of 5900+ intermediate commits — resolved by cherry-picking the fix directly onto main. Merge conflict status is now MERGEABLE. All 4 |
Fixes #1136
Problem
hooks-tools.tsused singular'pattern'as the memory namespace in 4 locations, while the rest of the codebase (workers/index.ts,reasoningbank/index.ts, README examples) consistently uses'patterns'(plural).This caused a silent data loss bug: intelligence hooks stored patterns in namespace
'pattern', butmemory_searchandmemory_listsearched in'patterns'— stored entries were invisible to normal memory operations.Fix
Changed all 4 occurrences in
hooks-tools.ts:namespace: 'pattern'→namespace: 'patterns'|| 'pattern'default →|| 'patterns'