Skip to content

P3: Negative-eval stress suite — forbidden hits, abstention, no-memory floor, re-ingestion, metric controls #43

Closed

Description

@abogartz

Part of #84.

Problem

Tests cover the happy paths and the framing tripwires, but there are no negative retrieval evals — assertions that the wrong memory stays out — and no bench-level controls proving the metrics can fail. Atlas: "A benchmark asks how good is this on the normal case. A stress test asks what input makes this fail… Almost all of these are cheap. None of them requires a labelled dataset." Silica's rule: "A metric that cannot fail reports PASS regardless of the arm."

Add (as failing tests, not stats)

  1. Forbidden hits (Waku-agent style): for every superseded gold memory, assert the superseded content never appears in top-k of scoreMemories or any injected block → STALE failure.
  2. Abstention: irrelevant query against a populated store must yield an empty injection block → INVENTED failure if not. (Currently measured as a bench stat; promote to a test.)
  3. No-memory floor: run the recall bench's QUERIES against an empty store; assert zero injection (chance floor = 0).
  4. Re-ingestion after prune/block: prune a memory, replay the same content through runWriteGate → must block. This test is the acceptance spec for P0: Value-keyed rejection tombstone — rejected content must stay rejected across re-ingestion #35 (value-keyed tombstone); write it first, watch it fail.
  5. Metric negative controls: assert the bench can fail — a reversed-order scorer must score below the naive arm on at least one class (pair of fixtures, per Silica: "at least two of them must disagree").
  6. Scope crossing: extend repo-scope tests to assert the injected block (digest + relevant-knowledge), not just loadAll().
  7. Governed-path tripwire: source-grep test asserting every write path calls runWriteGate (capture, import, tools) — the property Prime Agent lacks (their kernel CRUD bypasses the governed door); keep it from regressing.
  8. Poisoned row end-to-end: plant instruction-shaped content through import → assert framing, single-line collapse, and (once P1: Write-side threat scan for capture/import paths — quarantine tag instead of injection #38 lands) quarantine exclusion.

Activity

  1. added
    retrieval
    on Oct 24, 2026
  2. abogartz commented on Oct 25, 2026

    @abogartz
    OwnerAuthor

    Shipped via #96 (merged in main): the negative-eval suite (21 tests + the bench's published control arms). Deliberately still tracking two residuals that live with their owner tickets: item 4's re-ingestion guarantee is the red-first acceptance spec skipped in test/negative-eval.test.ts until #35 lands the value-keyed tombstone, and item 8's quarantine assertion is noted in place until #38. Closing this when those merge; the negative-eval coverage itself is done and pinned.

  3. abogartz commented on Oct 27, 2026

    @abogartz
    OwnerAuthor

    Closed as completed — the suite shipped as test/negative-eval.test.ts, with the two remaining acceptance lines carried by their own issues.

    Shipped, item by item:

    1. Forbidden hits — describe("forbidden hits — a retired memory never reaches a model") (scoreMemories, every sink, frontier, recall/list).
    2. Abstention — promoted from bench stat to assertion (abstention — an irrelevant query over a populated store injects nothing, incl. contextual pull).
    3. No-memory floor — no-memory floor — the chance floor is zero.
    4. Re-ingestion — the review-gated replay blocks identically; the tombstone variant is pinned as test.skip("pruned content stays rejected when replayed through the gate (#35)") and is P0: Value-keyed rejection tombstone — rejected content must stay rejected across re-ingestion #35's acceptance spec, where it stays tracked.
    5. Metric negative controls — metric negative controls — the eval can fail (reversed scorer, disagreeing arms per published size).
    6. Scope crossing on injected blocks — shipped with fix(security): session-scoped reads, evidence credential scrub, viewer origin preservation (#127 #128 #129) #133's test/security-session-isolation.test.ts (the injected system parts are the assertion target, deterministically interleaved).
    7. Governed-path tripwire — governed-path tripwire — no write path walks past the gate (source-grep over src/ with an allowlist that must not go stale).
    8. Poisoned row end-to-end — blocklist half shipped; the quarantine-exclusion half is P1: Write-side threat scan for capture/import paths — quarantine tag instead of injection #38's acceptance, tracked there.

    No acceptance line is lost: the only unshipped halves are the exact subjects of #35 and #38.

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

    retrieval

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions