Skip to content

The amnesty carries a number, not just an identity - #2772

Merged
gHashTag merged 2 commits into
masterfrom
w699-discard-ratchet
Aug 29, 2026
Merged

The amnesty carries a number, not just an identity#2772
gHashTag merged 2 commits into
masterfrom
w699-discard-ratchet

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Refs #2754

parse-no-discard's failure message has always carried a magnitude —

parser reached EOF but DISCARDED 208 top-level token(s); they never reach codegen

— and the ledger threw it away. An entry was (path, phase), so a spec could go from discarding one token to discarding 682 without moving a gate. The blindness runs both ways: the two parser fixes earlier today recovered 1 292 tokens and nothing could price them, because the population was 87 either way.

Three rules, matching the ones already there

parse-no-discard entries now carry discard_tokens:

{ "path": "specs/isa/ternary_deque.t27", "phase": "parse-no-discard", "discard_tokens": 1873 }
  • more is a failure — the regression signal that did not exist
  • less is also a failure — same reason an unexpected PASS is one. Unclaimed slack is where the next regression hides; re-bless to pin the lower number.
  • no reading is treated as WORSE, never as an improvement — a spec that stopped being measured and a spec that discards nothing look identical from the ratchet's side, and a map defaulting to zero would report every unreadable spec as a triumph.

Blessing writes what the run measured, so lowering is automatic on a re-bless and raising is a diff a human reads. 87 entries pinned, 32 485 tokens.

Seen failing on purpose, twice. Shifting one pinned value by −5 gives DISCARD WORSENED … (+5); by +5 gives DISCARD IMPROVED … (-5) -- re-bless to pin it. Five unit tests cover worsened, improved, unpinned, no-reading and exact match.

Correction

I have written three times — in a commit, a PR body, and the loop dashboard — that "the phase that would notice sits in the suite's BLOCKED column, so nothing reports it." That is false.

phase              corpus  scratch   blocked
parse                  91        0         0
parse-no-discard       87        0         0
no-vacuous-invariant    0        0        72

parse-no-discard reports 87 primary failures and 0 blocked. What sits in BLOCKED is no-vacuous-invariant. The mechanism is not blocking, it is amnesty: the ledger's 178 entries are 91 parse + 87 parse-no-discard, so every spec that discards is excused by name. That is a sharper finding than the one I reported, and it is what this PR acts on.

Two stale claims in the doc that says what a green run does not cover

The last place a stale claim should sit — it is read exactly when someone is deciding how far to trust a pass.

claim status
"parse-complete is not among the phases, and appending ))) … ((( leaves the ratchet CLEAN" false. Re-verified by doing it: UNEXPECTED FAILURES: 1 / + specs/account/auth.t27 [parse]
"5 standing unit-test failures" gone. cargo test --no-fail-fast is 2429 passed, 0 failed

Finding the next one

tri discard top --n 15
87 spec(s) discard 32485 token(s)

 tokens   pinned  spec
   1873     1873  specs/isa/ternary_deque.t27
   1813     1813  specs/igla/race/ternary_inference.t27
   1566     1566  specs/igla/race/ternary_gemm.t27

A count of 87 does not say where to start. It reads t27c parse-complete rather than re-implementing the accounting — a second implementation of a measurement is a second number to disagree with the first.

The field, for once shaped the same way

Notion's eslint ratchet records per-file allowances and decreases them automatically as issues are fixed. One decision apart from this: there an improvement silently tightens the bound, here it fails until someone blesses it. Same choice xfail_strict makes — an automatic tightening is invisible in review, and nobody notices when the tool tightens the wrong thing.

cargo test --no-fail-fast   2429 passed, 0 failed
suite --ratchet             RATCHET: CLEAN, exit 0
check_seal_coverage.py      exit 0
check_specs_generate.py     exit 0

🤖 Generated with Claude Code

W699. `parse-no-discard`'s failure message has always carried a magnitude --

    parser reached EOF but DISCARDED 208 top-level token(s)

-- and the ledger threw it away. An entry was `(path, phase)`, so a spec could go
from discarding one token to discarding 682 without moving a gate, and the two
parser fixes earlier today that recovered 1 292 tokens could not be priced: the
population was 87 either way.

`parse-no-discard` entries now carry `discard_tokens`, and the ratchet compares
it. Three rules, matching the ones already there rather than inventing new ones:

  * MORE is a failure -- the regression signal that did not exist
  * LESS is also a failure, for the same reason an unexpected PASS is one:
    unclaimed slack is where the next regression hides. Re-bless to pin it.
  * NO READING is treated as worse, never as an improvement. A spec that stopped
    being measured and a spec that discards nothing look identical from the
    ratchet's side, and a map defaulting to zero would report every unreadable
    spec as a triumph.

Blessing writes what the run measured, so lowering is automatic on a re-bless and
raising is a diff a human reads. 87 entries pinned, 32 485 tokens total.

Seen failing, on purpose, twice: shifting one pinned value by -5 gives
DISCARD WORSENED with `(+5)`, by +5 gives DISCARD IMPROVED with `(-5)`. Five unit
tests cover worsened, improved, unpinned, no-reading, and exact match.

CORRECTION. I have written three times -- in a commit, a PR body and the loop
dashboard -- that "the phase that would notice sits in the suite's BLOCKED
column, so nothing reports it". That is false. `parse-no-discard` reports 87
PRIMARY corpus failures and 0 blocked; what sits in BLOCKED is
`no-vacuous-invariant`, at 72. The mechanism is not blocking, it is amnesty: the
ledger's 178 entries are 91 `parse` plus 87 `parse-no-discard`, so every spec
that discards is excused by name. That is a sharper finding than the one I
reported, and it is what this commit acts on.

Two stale claims in docs/CORPUS-RATCHET.md, both in the section listing what a
green run does NOT cover -- the last place a stale claim should sit, since it is
read exactly when someone is deciding how far to trust a pass:

  * "`parse-complete` is not among the phases, and appending `))) ... (((` to a
    corpus spec leaves the ratchet CLEAN". Re-verified by doing it: the ratchet
    now names `specs/account/auth.t27 [parse]` as an unexpected failure.
  * "5 standing unit-test failures". Measured today: `cargo test --no-fail-fast`
    is 2429 passed, 0 failed.

New: `tri discard top --n 15` ranks the discarding specs against their pinned
bound. A count of 87 does not say where to start; `specs/isa/ternary_deque.t27`
at 1 873 tokens does. It reads `t27c parse-complete` rather than re-implementing
the accounting.

And the field, for once shaped the same way: Notion's eslint ratchet records
per-file allowances and DECREASES them automatically as issues are fixed. One
decision apart from this -- there an improvement silently tightens the bound,
here it fails until someone blesses it. Same choice `xfail_strict` makes: an
automatic tightening is invisible in review.

    cargo test --no-fail-fast   2429 passed, 0 failed
    suite --ratchet             RATCHET: CLEAN, exit 0
    check_seal_coverage.py      exit 0
    check_specs_generate.py     exit 0

Refs #2754

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 00:55:04 UTC

Summary

Status Count
Total Open PRs 8
PRs with Failing Checks 7
PRs with All Checks Green 1
READY 0
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3abc96dcebd6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

…ts first (156-158)

I confused "blocked" with "amnestied" three times in one day; they look alike
from a green run and the fix for each is the opposite of the other.

An amnesty keyed by identity cannot see magnitude, and the third rule for adding
one -- no reading is WORSE, never an improvement -- is the lesson a
Default::default() on a lookup silently gets wrong.

And the "what this does NOT cover" section is the one read when someone is
deciding how far to trust a pass, which is why a stale claim there costs the
most. Two were stale; both re-verified by running them.

Refs #2754

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-29 00:55:57 UTC

Summary

Status Count
Total Open PRs 8
PRs with Failing Checks 7
PRs with All Checks Green 1
READY 0
FAILING 7
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3abc96dcebd6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 1c70810 into master Aug 29, 2026
34 checks passed
@gHashTag
gHashTag deleted the w699-discard-ratchet branch August 29, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant