Skip to content

fix(retrieval): conflicted memories are still injected into agent prompts with no badge (T-405) #313

Closed

Description

@harshsinghmp

Tracking T-405 (HIGH).

The defect

A memory whose status is conflicted — the status the contradiction engine assigns to both sides of a detected contradiction — is still served into agent prompts, with no badge and no marker.

The status filters exclude superseded, rejected, archived and expired, but not conflicted:

  • src/retrieval.ts:1686-1701
  • src/retrieval/ranking.ts:272-273
  • src/orchestrator/context.ts:144-147

What is already true (do not re-derive this)

A conflicted memory is soft-penalised: STATUS_PENALTY maps conflicted: -0.8 (src/types.ts:342), src/retrieval.ts:956 reads it into statusPenalty, :1072 adds it to totalScore, and src/retrieval/ranking.ts:6 imports computeFactors from ../retrieval.ts and uses it at :140 — so both retrieval paths apply the penalty. Conflicted entries are also removed from every sync broadcast.

The gap is that a rank discount is not a filter. A genuinely contradicted memory still reaches the model.

Why it is not folded into T-320

Changing retrieval output changes the golden recall fixtures, so it needs its own ticket and its own test pass.

Note

An earlier note in the ticket board claimed the −0.8 rank penalty did not exist. That was wrong, and it has been corrected in .agents/context/ticket-plan.md. The gap is wider than originally recorded: three retrieval paths, not one.

Suggested acceptance

  • A conflicted memory is either excluded from default retrieval, or injected with an explicit badge.
  • The behaviour is covered by a regression test in each of the three retrieval paths.
  • The golden recall fixtures are updated deliberately, not as a side effect.

Activity

  1. added a commit that references this issue on Oct 24, 2026
  2. harshsinghmp commented on Oct 24, 2026

    @harshsinghmp
    OwnerAuthor

    Resolved in v3.1.1 — conflicted memories are withheld from every prompt-serving retrieval path by default (shared include_conflicted opt-in, PR #321 merged at e30a1b7; carried to main by #324, released as v3.1.1). Receipts: suite 1408/0 (213 files), Fresh Critic 9.5/10 with a mutation-verified overfetch test, golden recall fixture untouched (corpus carries zero conflicted entries).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions