feat: structured multi-memory actions for dedup pipeline#321
Merged
win4r merged 2 commits intoCortexReach:masterfrom Mar 23, 2026
Merged
feat: structured multi-memory actions for dedup pipeline#321win4r merged 2 commits intoCortexReach:masterfrom
win4r merged 2 commits intoCortexReach:masterfrom
Conversation
Extends the dedup LLM response to support an optional "actions" array that can target multiple existing memories in a single dedup decision. For example, "merge with memory 1, delete outdated memory 2". Changes: - src/memory-categories.ts: new DedupAction type, actionsExecuted in ExtractionStats - src/extraction-prompts.ts: add actions array to dedup prompt output schema - src/smart-extractor.ts: parse + validate actions from LLM response, executeSecondaryActions() with delete-first ordering and per-action error handling - test/dedup-actions.test.mjs: 8 tests (types, validation, execution order) Backward compatible: missing "actions" field works exactly as before. Ref: https://github.com/CortexReach/memory-lancedb-pro-enhancements Feature 2 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. [High] Pre-resolve memory IDs at dedup time instead of re-querying store.list() later — prevents index drift causing wrong memory deletion 2. [Medium] Restrict secondary actions to "delete" only — "merge" was accepted but never executed, causing misleading stats 3. [Medium] Tighten dedup prompt to only mention "delete" as valid action Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Extends dedup to support secondary actions on multiple existing memories in one decision.
DedupActiontype:{ matchIndex, action: "merge"|"delete", reason }actions: [...]alongside the primary decisionactionsfield = existing behaviorTest plan
Ref: memory-lancedb-pro-enhancements Feature 2
🤖 Generated with Claude Code