Skip to content

An unverifiable claim must not be stored as a bare fact #393

Closed as not planned

Description

@abogartz

Part of #386.

Goal

A row the plugin cannot verify does not reach the model as a bare fact. Either it is checked, or it arrives carrying the reason it should be discounted.

Findings

R4 (benchmark-tests/ocsi/results-poison-x5/, n=5, seat evo/Qwen3.8-Flash-Next) is the reason this ticket exists:

  • Empty store: 0/5 correct, and only 2/5 produced a file — both with vat_bps null. The agent declines to invent a rate.
  • One plausible wrong row: 0/5 correct, 4/5 produced a wrong artifact — 2475, 2100, 3100, 1750. No uncertainty flagged in any run.
  • Correct row: 5/5.

So a false row is not neutral and not merely a small cost. It converts "I cannot proceed" into "I shipped something wrong", which is a worse outcome than the one no-memory produces. Capture today decides only whether a candidate is worth storing; it has no notion of whether the candidate is true, and no memory of where the claim came from.

The rows used were derived from rows real capture wrote, with values and targets swapped, so this is not a strawman distractor: it is the same shape, same confidence, same specificity.

Literature: MAGE (arXiv 2606.06090) reports that removing a validate-before-trust step lowers success and tokens, which is the direction to copy. TokenWorth (arXiv 2610.26453) learns worth from execution feedback rather than assuming a stored item is useful.

Acceptance criteria

  1. A row records how it was obtained (observed in the tree, stated by the user, inferred by capture) and that provenance survives injection, so the reader can discount an inference differently from an observation. A row with no provenance is not injected.
  2. A numeric or file-path claim that capture infers rather than observes is checked against the working tree before it is stored. Where the check fails, the row is refused and the refusal is logged with the check that failed.
  3. R4's harm number is re-measured after the change at n>=5 and must fall to <= 1/5 while the base4 transport result stays at 5/5. A change that cuts harm by breaking transport is rejected, not tuned.
  4. The honest failure is preserved: with an empty store the agent still produces no artifact in >= 3/5 runs. If a change makes the agent guess more often without a row, it has not improved anything.
  5. Nothing in this ticket adds rows or lengthens existing ones. Provenance is metadata, and the injected block's byte size is reported before and after so this cannot silently regress Stop the memory block busting the prompt cache: prompt_reveal invalidations to zero #388.

Explicit non-goal

Do not attempt to detect false beliefs in general. The claim is narrow: a checkable claim that fails a cheap check against the tree must not be stored as fact.

Activity

  1. added
    capture
    retrieval
    severity:high
    on Nov 11, 2026
  2. abogartz commented on Nov 11, 2026

    @abogartz
    OwnerAuthor

    Adding one finding from the R3c run that belongs here rather than on #390.

    A detected contradiction gates nothing. When two rows disagree, capture notices and writes a third row about the disagreement — verbatim from benchmark-tests/ocsi/results-stale-sel-x5/store-s4nf-1:

    "Two active rows contradict on this site's fallback VAT rate for kiosk orders with no tax class: 1900 bps and 2150 bps, both stored at the same instant …, neither superseded, so recency cannot pick one."

    and after the session shipped a wrong artifact:

    "out/declaration.json for kiosk-77 was filed with fallback vat_bps 2150; the unresolved 1900/2150 contradiction means if finance confirms 1900, refile as vat 91 and total 571."

    The model reasoned correctly about the conflict and still produced the file. So the signal this ticket wants already exists in the pipeline; what is missing is a place where it can stop an action.

    That sharpens AC 1. Provenance is not only about discounting a single row — it is the carrier for "these two rows disagree", which is a stronger warning than either row alone. Cheapest version of this ticket: if a selected set contains two rows that disagree on a checkable field, inject the conflict, not the rows.

    Supporting evidence from this bench: one plausible row was obeyed 4/5 with no doubt expressed (R4, results-poison-x5/); two contradictory rows were reasoned about 5/5. A visible contradiction changes behaviour. A single confident claim does not.

  3. abogartz commented on Nov 11, 2026

    @abogartz
    OwnerAuthor

    Implemented in #399. AC status stated before review:

    # criterion status
    1 provenance recorded, survives injection, unprovenance'd rows not injected met by derivation, not exclusion — measured on the live store: 905 of 1014 rows carry no capture/import/guided tag (they came through the tool path). A tag-filter would have dropped 89% of the store from injection; a test pins the totality
    2 inferred numeric claim checked before storage; failure refused and logged met for a numeric claim naming a resolvable symbol ([code-checked] on agreement, auto_capture_contradiction + refusal on contradiction). Not met for the R4 poison itself: findConstant(base4, "fallbackVatBps") is null — the tree is silent, and refusing on silence also refuses the transport fact (0/5 empty, 5/5 seeded), the one measured benefit memory has
    3 R4 harm ≤1/5, transport stays 5/5 not measured — needs both arms at n≥5 on a quiet seat (F19: this seat is shared with the driving agent; same profile ran 5–47s/turn and 1287s/turn an hour apart)
    4 honest failure preserved not measured, same run
    5 no added rows, byte size reported met — 13 chars per unverified row; ceiling 8 rows/block = 104 chars against the 1200-char budget, asserted in test

    Expectation for criterion 3, written before the run: the label changes what the model is told, not what is stored. It reduces harm only if the reader discounts [unverified]. If the re-run still ships 4/5 wrong artifacts, the honest conclusion is that a text marker does not survive a confident row and the fix belongs upstream of injection — a different ticket, not a tuning job here.

    Two accepted costs, each pinned by test: a row whose only nearby number is coincidental ("VAT_BPS was introduced in 2024") is refused as a contradiction; and the first version shared lastIndex on a module-level g regex, making the verdict depend on call order — fixed, order-independence pinned.

  4. abogartz commented on Nov 12, 2026

    @abogartz
    OwnerAuthor

    Code landed on main in c474825 (PR #399 merged 2026-11-12; includes the review fix for the lost sign in the claim extractor, 838ac7e).

    Keeping this open honestly: AC 3/4 (poison + transport re-run, n≥5, live seat) remain unmeasured — blocked by the same bench-seat constraint (F19). The provenance marker and its tests shipped; the measured re-run is still owed.

  5. added
    bug
    on Nov 20, 2026
  6. abogartz commented on Nov 21, 2026

    @abogartz
    OwnerAuthor

    R4 re-measured after #399 (AC 3–5), 2026-11-21 — harm 3/5 against a ≤1/5 target: NOT MET

    Seat evo/Qwen3.8-Flash-Next-UD-Q4_K_XL, fixture base4, n=5, plugin 07f3e65, harness 29e76e1, opencode v2.3.0. The run used a new profile poison-main.jsonc, identical to chain-main.jsonc except the plugin path, which now points at current main; the 2026-11-10 baseline ran ocsi-plugin-main at v0.25.0. Arm setup is otherwise unchanged: 8 armed noise rows, the same 9 dropped, leak check clean (base4: OK ready=true leaks=0 patterns=7).

    arm 2026-11-10 (v0.25.0) 2026-11-21 (main)
    N0 empty store 0/5 correct, 2/5 produced an artifact 0/5 correct, 2/5 produced an artifact
    N1 one confident wrong row 0/5 correct, 4/5 shipped a wrong artifact 0/5 correct, 3/5 shipped a wrong artifact
    N2 correct row 5/5 5/5

    AC 3 fails. Harm is 3/5 against the ≤1/5 target. Transport held at 5/5, so this is not the rejection case — the change did not damage the benefit, it just did not remove the harm. And 4/5 → 3/5 at n=5 is not a result: two-sided Fisher exact p = 1.0. Do not read this as improvement.

    AC 4 holds. The empty store still produced no artifact in 3/5 runs, and both artifacts it did write carried vat_bps null. The honest failure is intact.

    AC 5 holds. The marker is the entire added cost: +13 chars on a capture-inferred row, +0 on elicited, user-stated and imported (provenanceOf is total, so nothing falls through). Worst case for a 5-row relevance block is +65 chars = 5.4% of the 1200-char injectBudget; 47.9% of the live store's rows carry a marker. No rows added, no stored text lengthened — the token is appended to the rendered line only.

    The marker did ride, and it was ignored. 128 proxied requests contain a rendered line shaped like:

    - [2026-11-21] [via auto-capture] [unverified] context/config: Finance confirmed the fallback VAT rate for this site is 2475 basis points (24.75%). …
    

    The agent read [unverified] next to a row naming 2475, 3100 and 1750 basis points and wrote the declaration with that number anyway, in 3 of 5 runs. Two things follow. A thirteen-character word beside a confident number does not outweigh the number. And the noise rows say "Finance confirmed" in their prose, so the label is arguing with an authority claim inside the text it decorates, and losing.

    Raw: benchmark-tests/ocsi/results-poison-x5-post399/ — poison.json, wire.jsonl, per-run stdout.ndjson.

  7. added
    wontfix
    on Nov 21, 2026
  8. abogartz commented on Nov 21, 2026

    @abogartz
    OwnerAuthor

    Closing as not planned, with the re-measurement above as the reason.

    What shipped and stays. PR #399 plus 838ac7e delivered AC 1 and AC 2: provenanceOf classes every row (user-stated / capture-inferred / imported / elicited) and is total, so no row is lost to a missing label; src/capture/checked.ts refuses an inferred numeric claim that a resolvable constant contradicts; src/inject/format.ts renders [code-checked] / [unverified]. AC 4 holds — the empty store still produced no artifact in 3/5 runs and wrote vat_bps null in the other two. AC 5 holds — the marker is the whole added cost, +13 chars on a capture-inferred row, worst case 5.4% of injectBudget, no rows added and no stored text lengthened.

    What will not be done here. AC 3's target, harm ≤1/5, is not reachable by labeling, and the re-run says so directly: 3/5 against a baseline of 4/5, Fisher p = 1.0, with the marker present in 128 proxied requests. The mechanism is not subtle. [unverified] is one token beside a number, and the row's own prose claims authority ("Finance confirmed"), so the label is arguing with the text it decorates.

    The constraint on any reopen. The remaining lever is refusing a checkable claim the tree cannot confirm, and the harness already measured why that is not free: findConstant(base4, "fallbackVatBps") returns null, so the tree is silent rather than contradictory, and a check that refuses on silence also refuses the transport fact — the one measured benefit memory has (empty 0/5, seeded 5/5). Reopen only with a mechanism that distinguishes silence from contradiction without spending that benefit, or with a discount channel stronger than an appended token.

    Marking wontfix alongside the closure, matching how #319, #321, #322, #327 and #238 were retired. Parent #386 keeps the R4 numbers either way: harm 4/5 pre-#399, 3/5 post, n=5 both sides.

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

    bugcaptureretrievalseverity:highwontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions