Skip to content

Memory correctness cleanups (contradiction fallback, note merge, batch dedup) #287

Description

@prakashUXtech

Three related correctness gaps in the memory pipeline (2026-07-03 dev audit, commit 2ad0eb9):

  • Raw-text contradiction fallback sets superseded_by = "raw-text-contradiction" (a sentinel string in an id field) and suppresses the old fact with no replacement stored, so the soul loses the knowledge entirely. manager.py:1156-1166; semantic recall filters it out at semantic.py:99.
  • note()'s documented contradiction detection is a no-op (_ = detect_contradictions at soul.py:1513), and its MERGE branch sets the old entry's superseded_by without the new entry's supersedes back-edge or a supersede-audit record, so note-driven merges are invisible to provenance (soul.py:1587-1612, :2263).
  • observe() snapshots existing facts once before iterating a batch, so two near-identical facts extracted from the same interaction are never compared and both persist (manager.py:1049). The dream sweeper only catches overlap >= 0.85, so 0.6-band pairs survive.

Impact: degraded recall, lost facts, unreconstructable provenance, and duplicate accumulation in the capped semantic store.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpinnedExempt from stale bot auto-closestale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions