Skip to content

Exact duplicates are stored again although the README says duplicates are merged #707

Closed

Description

@cdeust

Summary

The README says a near-duplicate is merged into the memory it restates instead of being filed beside it. An exact duplicate is stored again, and an identical automatic capture replayed seven times was stored seven times.

Evidence

Measured by an independent audit on 2026-10-10 in an isolated SQLite profile (main at b4a62b2) and read in the README.

  • README.md lines 140 and 141: "Novel content is written; a near-duplicate is merged into the memory it restates rather than filed beside it."
  • The audit wrote an exact duplicate of an existing memory: action: stored with a new id. A near-duplicate was stored too. The same Bash capture replayed 7 times produced 7 rows, and the duplicates pushed the target out of the top 3 for the test queries. consolidate did not merge the exact duplicates.
  • Related, separate from this issue: a contradicting memory written without supersedes_id is stored and ranked next to the original, with nothing detecting the contradiction.

Expected

Exact duplicates are detected by a content hash at write time (automatic capture included) and merged or refused with a visible reason. Near-duplicates follow what the README says or the README says what the write gate really does for deliberate writes. consolidate merges exact duplicates already in the store. A test that writes the same text seven times and expects one row.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions