Repository navigation
An unverified row says so where the model reads it (#393) - #399
Conversation
Part of #386, ticket #393. R4 (results-poison-x5/, n=5) is the evidence. Empty store: 0/5 correct, and only 2/5 produced a file at all -- both with `vat_bps null`, because the agent declines to invent a rate. One plausible wrong row: 0/5 correct, 4/5 shipped a WRONG artifact (2475, 2100, 3100, 1750), no uncertainty flagged in any run. Correct row: 5/5. A false row is not neutral; it converts "I cannot proceed" into "I shipped something wrong". The rows were real capture output with values and targets swapped, so this is the same shape and confidence, not a strawman. What ships is the part the evidence supports: a label the reader discounts by, plus a check that refuses only on a real contradiction. Provenance is DERIVED and total. Measured on the live store: of 1014 rows, 109 carry `auto-capture`, 18 carry `user-guided`, 0 carry `import`, and 905 carry none of those -- they came through the tool path, which is a provenance and not an absence of one. "A row with no provenance is not injected" therefore cannot be a filter over tags: it would have dropped 89% of the store, a recall loss wearing a safety badge. A test pins the totality so nobody simplifies it back into one. Only an inference that nothing outside its own transcript vouched for renders `[unverified]`; an inference whose number agreed with the working tree renders `[code-checked]`. User-stated and tool-elicited rows render nothing, because decorating 905 of 1014 rows with a warning would teach the model to ignore the warning. The marker is appended rather than folded into `[via ...]`, whose exact text several tests pin. Cost: 13 chars per unverified row, ceiling 8 rows per block = 104 chars against a 1200-char budget (AC 5, asserted). The write-time check refuses ONLY on contradiction, and the measurement is why it goes no further. `findConstant(base4, "fallbackVatBps")` is null: the fixture leaves the rate unset, which is exactly where a confident wrong row fits. A check that refuses when the tree contradicts refuses nothing in R4; a check that refuses when the tree is SILENT also refuses the transport fact (empty 0/5, seeded 5/5), the one measured benefit memory has. So `undecidable` keeps the row and labels it. Capture's structured ref/claim ride user-guided rows only, and guided rows are the ones this must not touch -- a user correcting a stale tree is the case where the tree is wrong. So an inferred row is checked on what it says: a symbol it names (SCREAMING_CASE or a dotted member) plus a number within 48 chars. Two costs named rather than buried, each with a test: - a row whose only nearby number is not the value ("VAT_BPS was introduced in 2024") is refused as a contradiction; - the first version kept `lastIndex` on a module-level `g` regex, so a claim was "undecidable" because of which row was checked last. A gate whose answer depends on call order looks deterministic and is not. The regex is now built per call and order-independence is pinned. - src/store/model/provenance.ts: derivation + marker, with the 905/1014 measurement - src/capture/checked.ts: content-level claim check, three verdicts - src/capture/runtime.ts: refuse on contradiction, tag on agreement, `auto_capture_contradiction` evidence - src/core/tags.ts: CODE_CHECKED_TAG - src/inject/format.ts: render the marker - test/provenance.test.ts: 15 tests; 6 fail without the wiring Not done here: AC 3 and AC 4 need the poison and transport arms re-run at n>=5 on a quiet seat. FINDINGS F19: this bench seat is shared with the agent driving it, and the same profile ran 5-47s per turn and 1287s per turn an hour apart. Co-authored-by: OpenCode <[email protected]>
WhollyMindless
left a comment
There was a problem hiding this comment.
P2 — the prose number extractor loses a sign before granting [code-checked] (src/capture/checked.ts:88, head 8bcb6ac187358581dc268fdcba29025cc51efc3b).
With the actual tree declaring export const VAT_BPS = 2150, a capture candidate saying The VAT_BPS constant for this site is -2150 basis points. is persisted and rendered with [code-checked]. The new unsigned \d+(?:\.\d+)? match passes 2150 to valuesAgree, even though the row still says -2150. No contradiction receipt is emitted. As a control, the existing structured claimVerdict(repo, "VAT_BPS", "-2150") returns contradicts against the same tree: the sign is lost specifically by this new extraction path.
Could the extractor preserve signed numeric values (or leave unsupported numeric syntax undecidable) before deciding agreement? The observed consequence is stronger than missing a warning: an opposite-signed value is positively labelled as checked against source.
Validation: Windows/Bun 1.4.4; 105 focused provenance/capture/injection tests and typecheck pass, plus one separate capture-to-store-to-format probe (5 assertions, including the structured-verdict control). Synthetic transcript/canned model reply only; no downstream model behavior or live-host incidence claimed. This is separate from the coincidental-nearby-number refusal already disclosed in the PR.
|
Authorship disclosure for the review above: I authored the earlier contradiction-surface PRs #355-363. The signed-value finding concerns the new prose extractor in this PR; the review does not independently approve that earlier code. |
…-checked Review finding on #399 (WhollyMindless), reproduced as stated: with the tree declaring VAT_BPS = 2150, a candidate saying "-2150 basis points" extracted the unsigned 2150, agreed, and shipped labelled [code-checked] with no contradiction receipt. An opposite-signed value was positively vouched for by the check -- stronger than a missing warning. Fix at the extraction point: the near-number match now carries an adjacent leading [+-], which valuesAgree already parses. A hyphen separated by spaces stays a separator, so "2150 - a later discount aside" still agrees. The structured control from the review is pinned alongside: claimVerdict with a declared "-2150" contradicts the same tree, proving the loss was specific to the prose path. Co-authored-by: OpenCode <[email protected]>
|
@WhollyMindless finding confirmed and fixed in Reproduced as stated before touching code: with Fix at the extraction point, not the verdict: the near-number match now carries an adjacent leading The structured control from the review is pinned next to the regression:
|
WhollyMindless
left a comment
There was a problem hiding this comment.
The signed-value finding is independently verified fixed at 838ac7e62b1cb580bc0eec82038db7d76a6ad3df. Replayed the candidate saying VAT_BPS ... -2150 against a tree declaring 2150: no row persists, an auto_capture_contradiction receipt is emitted, and the structured-verdict control also contradicts. The previous false [code-checked] result is gone.
106 focused provenance/capture/injection tests, the separate capture replay (3 assertions), and typecheck pass on Windows/Bun 1.4.4. This does not certify the unmeasured R4 label effect. Disclosure: I authored earlier contradiction-surface PRs #355-363; this approves the maintainer's new extractor fix, not independent certification of that earlier code.
Review finding on #400 (WhollyMindless), reproduced as stated: two `context` rows in one scope — "The MAX_RETRIES constant is 3 in production." then "...is 5 in staging." — both promote, and the second marked the production row superseded (reason=numeric_conflict), so a later MAX_RETRIES recall carried only the staging value. A normal new fact hid a correct prior fact. Guard 4, in the direction the review asked: automatic retirement now needs the environments to AGREE — both rows unscoped, or naming at least one environment in common. A mismatch, and one-sided scoping too ("is 3" may be the default; hiding it behind one environment's value is the same defect), retires nothing and both rows stay injectable. Closed vocabulary of deployment words; region/edition/tenant qualifiers are NOT detected, and every miss lands on the safe side — coexistence, the pre-#390 state, never a hidden fact. Found while testing the guard: tokens() keeps dots (they carry dotted members), so "staging." arrives as "staging." — the first implementation matched nothing and the reviewer's pair still retired. The qualifier check compares the bare word; the test pins the sentence-final period. Also fixed in the same extractor, same class as the #399 sign bug: the value window matched unsigned digits, so "-5" extracted as "5" and a sign flip read as agreement. The sign is now part of the value; "-5" corrects "5", "-5" restated is still one fact. - src/gate/value-conflict.ts: guard 4 + signed extraction - test/value-conflict.test.ts: the reviewer's pair both directions, one-sided scoping, same-environment still corrects (the cost), the two-write/recall probe, sign flip; the four fail on the pre-fix code Cost named: a genuine correction that ADDS an environment word ("actually in production it is 1900") no longer auto-retires the bare row — both inject, retrieval shows both, the model sees the scoping instead of a silent winner. Retirement is the destructive half; precision wins there. Co-authored-by: OpenCode <[email protected]>
# [0.23.0](v0.22.2...v0.23.0) (2026-11-12) ### Bug Fixes * **capture:** redact attested args, and match a citation as a whole field ([15e764e](15e764e)), closes [#384](#384) [#132](#132) * **capture:** the prose extractor keeps the sign before granting code-checked ([838ac7e](838ac7e)), closes [#399](#399) * **gate:** different environments are two facts, never a correction ([64184c5](64184c5)), closes [#400](#400) [pre-#390](https://github.com/pre-/issues/390) [#399](#399) * **gate:** digits are context; only the corrected value may drop out ([d24744b](d24744b)), closes [#400](#400) * **gate:** excise the asserted value by position, not by literal ([8114cec](8114cec)), closes [#400](#400) * **gate:** same-context is established by the words, not looked up ([0d0afbe](0d0afbe)), closes [#400](#400) [pre-#390](https://github.com/pre-/issues/390) ### Features * **capture:** let a failed session leave a lesson, but only an attested one ([458b8ce](458b8ce)) * **gate:** a correction retires the row it corrects in the data ([bcba2f4](bcba2f4)), closes [#390](#390) [#393](#393) [#208](#208) [#389](#389) [#393](#393) [#393](#393) * **provenance:** an unverified row says so where the model reads it ([8bcb6ac](8bcb6ac)), closes [#386](#386)
|
🎉 This PR is included in version 0.23.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
Follow-up to my review: the ASCII-minus fix still works, but fresh scripted-capture probes on main
checked.ts:94–99 accepts any agreeing nearby number, even one the assertion explicitly rejects, and the extractor drops the Unicode sign. This upgrades contradictory prose to a positive verification label. For ambiguous multi-number/negated prose or unsupported numeric syntax, retaining Observed through capture → store → formatter on Windows with a canned model response; no claim about how often a real model emits these strings or how a reader acts on them. Disclosure: we authored earlier provenance-related code in #355–#363; this is a follow-up on that shared lineage, not independent certification of it. |
Part of #386. Addresses #393.
The evidence
R4 (
results-poison-x5/, n=5, seatevo/Qwen3.8-Flash-Next):vat_bps null: the agent declines to invent a rateA false row is not neutral. It converts "I cannot proceed" into "I shipped something wrong". The poison rows were real capture output with the values and targets swapped: same shape, same confidence, same specificity.
What ships, and why no more
A label the reader discounts by, plus a check that refuses only on a real contradiction.
Provenance is derived, and total. Measured on the live store: of 1014 rows, 109 carry
auto-capture, 18 carryuser-guided, 0 carryimport, and 905 carry none of those — they came through the tool path, which is a provenance, not an absence of one. Criterion 1's "a row with no provenance is not injected" therefore cannot be a filter over tags: it would have dropped 89% of the store from injection. A test pins the totality so nobody simplifies it back into one.Only an inference nothing outside its own transcript vouched for renders
[unverified]; an inference whose number agreed with the tree renders[code-checked]. User-stated and tool-elicited rows render nothing — decorating 905 of 1014 rows with a warning would teach the model to ignore the warning. The marker is appended, not folded into[via …], whose exact text several tests pin.The check refuses only on contradiction, and the measurement is why it goes no further.
findConstant(base4, "fallbackVatBps")returns null: the fixture leaves the rate unset, which is exactly where a confident wrong row fits.So
undecidablekeeps the row and labels it. Capture's structuredref/claimride user-guided rows only, and guided rows are the ones this must not touch — a user correcting a stale tree is the case where the tree is wrong. An inferred row is therefore checked on what it says: a symbol it names plus a number within 48 characters.AC status, stated before review
Expectation for criterion 3, written before the run: the label changes what the model is told, not what is stored, so it can only reduce harm if the reader discounts
[unverified]. If the re-run shows 4/5 wrong artifacts anyway, the honest conclusion is that a text marker does not survive a confident row, and the fix belongs upstream of injection — which is a different ticket, not a tuning job on this one.Two costs named rather than buried
lastIndexon a module-levelgregex, so a claim came outundecidablebecause of which row was checked last. A gate whose answer depends on call order looks deterministic and is not. The regex is built per call now, and order-independence is pinned by test.Verification
bun run gate: 1224 unit tests, 30 e2e against a real opencode host, typecheck and lint clean.test/provenance.test.ts: 15 tests, 6 of which fail without the wiring.