feat(extraction): drop candidates that echo a recent manual store - #963
Open
gorkem2020 wants to merge 1 commit into
Open
feat(extraction): drop candidates that echo a recent manual store#963gorkem2020 wants to merge 1 commit into
gorkem2020 wants to merge 1 commit into
Conversation
…o-guard, PR 963 delta)
gorkem2020
marked this pull request as ready for review
August 29, 2026 12:24
Contributor
Author
gorkem2020
force-pushed
the
feat/manual-echo-guard
branch
from
August 29, 2026 12:24
2b40a6a to
dfe94e9
Compare
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.
Problem
When a user stores a fact manually with
memory_store(ormemory_update), the same conversation turn usually still flows through auto-capture extraction. The extractor then re-emits the just-stored fact as a candidate, and the pipeline spends judge, dedup, and merge LLM calls deciding what to do with a row that already exists verbatim. In the noisiest case the near-duplicate survives as a second row.Fix
A small deterministic echo guard:
memory_store/memory_updatetexts are recorded in an in-memory per-agent ring (8 entries, no persistence, no config surface).Paraphrase-level echoes (same meaning, different words) are deliberately out of scope: covering them would need embedding lookups and would risk dropping genuinely new memories. The word-level tiers plus the existing dedup layer cover the observed failure shape.
Notes
tools.tsregion; this diff is the last commit on the branch. Best reviewed after feat(tools): manual-priority supersede for memory_store #960 merges.test/manual-echo-guard.test.mjs(17 cases: tier matches, short-text guard, per-agent isolation, ring eviction); registered in the test chain and CI manifest.🤖 Generated with Claude Code