[GH-1160] Fix consolidation pipeline silently destroying user-defined tags by o-love · Pull Request #1164 · MemMachine/MemMachine
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 148
Conversation
o-love
changed the title
Fix consolidation pipeline silently destroying user-defined tags
[GH-1160] Fix consolidation pipeline silently destroying user-defined tags
Comment on lines +376 to +377
Comment on lines +819 to +839
Three compounding bugs caused the consolidation LLM to replace user-defined tags (e.g. 'bugfix', 'progress') with invented names (e.g. 'Productivity Style'): 1. build_consolidation_prompt() never received valid tag names, so the LLM had no knowledge of which tags were allowed. 2. _features_to_llm_format() stripped metadata IDs before sending features to the consolidation LLM, making keep_memories unreliable. 3. _deduplicate_features() wrote LLM-returned tags directly to storage with no validation, allowing silent tag renaming. Fixes: pass tags to consolidation prompt, add ID-preserving serializer for consolidation, and enforce original tag on consolidated features.
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