test(ratchet): read the buffer and the ceilings from the gate, not from prose beside it - #1341
Merged
os-trump merged 1 commit intoAug 27, 2026
Conversation
…om prose beside it Three restatements of the source token ratchet's ruled figures had no producer-side pin, and one of them had already rotted. - `TOLERANCE` in the README-figures rule was a hand copy of 0.05 under a comment claiming it was the ratchet's own, reused. It imports `BUFFER` now; the value is unchanged. - That file's docstring band table said `ceiling 42,000` for the interaction layer, eleven days after #1320 re-anchored it to 40,000, and argued from the stale number that this rule was the tighter of the two. Corrected, and pinned: every field of both rows is derived from the README banner, `BUFFER` and `CEILINGS`, and the paragraph's claim is pinned as the relation it draws on. - The gate header's two declined `anchor()` re-anchorings are reflowed onto one worked line each, beside the reading and the ceiling they come from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ED4cusQ7pxZ7d7TCLKrZb
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Aug 27, 2026
os-trump
marked this pull request as ready for review
August 27, 2026 04:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1335
Three restatements of the source token ratchet's ruled figures had no
producer-side pin. One of them called itself a reuse while being a hand copy,
and one had already rotted against a ceiling that moved eleven days ago.
What changed
1.
test/docs-readme-token-figures.test.ts—TOLERANCEimportsBUFFER.It was
const TOLERANCE = 0.05under a comment calling it "the ratchet's own,reused". The comment is the reason the copy survived: a reader who checks a
literal against its stated source, and finds the claim already made, stops
looking. It now imports
BUFFERfrom the gate, exported for exactly this sincePR #1334. The value is unchanged.
2. The same file's docstring band table — corrected and pinned.
The table stated
ceiling 42,000for the interaction layer. That ceiling hasbeen 40,000 since PR #1320 re-anchored it, and the paragraph under the table
reasoned from the stale number, concluding that this rule was the tighter of
the two and fired ~1k early. Both halves are corrected: the row now reads
ceiling 40,000, and the paragraph states what is true of both layers today —the band's upper edge sits past the committed ceiling, so on growth the ratchet
fails first, and the direction this rule owns alone is shrinkage.
The table is now derived rather than transcribed. A new
describeblock readsthis file's own docstring and asserts, per row:
banner ~81kCLAIMSpatterns the rest of the file usesbanner ± BUFFER, importedceilingCEILINGS.get(label), importedband upper edge > the row's ceiling, pinned as the relation it argues fromNothing in the block is calibrated against today's constants, so a re-anchoring
moves the constant and the row follows it or fails.
3.
scripts/check-source-token-ratchet.mjsheader — reflowed, not yet pinned.The sentence recording the two re-anchorings that were declined as raises stated
both
anchor()outputs mid-paragraph, wrapped across a comment line break. Bothare correct today (re-derived:
anchor(82,489) = 87,000against a committed85,000;
anchor(133,840) = 141,000against 140,000). It is reflowed into oneworked line per declined re-anchoring, in the shape of the table above it, so
each figure sits on one line beside the reading it comes from and the ceiling it
would have raised. It is deliberately left unpinned — see below.
Why pinning here, when last week's card deleted its figures instead
Both are the same rule applied to different inputs. A figure whose producer is
one import away gets pinned; a hand-maintained count with no producer gets
deleted, because a corrected copy of it is just the next one to go stale. Every
figure in item 2 has a producer:
CEILINGS,BUFFER, and the README banner.Why item 3 is not pinned in this PR
Not a difficulty with the reflow — the reflow is done and the sentence is now in
a shape a single-line regex reads cleanly. The obstacle is where the pin
belongs. Its natural home is
test/source-token-ratchet.test.ts, whichalready pins the header table beside it and already holds every helper such a
pin needs (
source(),num(),ceilingOf(), and theRUN/RUN_READINGSpair that ties a row's reading to the anchoring run it came from). That file is
outside this card's declared file surface, and writing the pin into the
README-figures file instead would mean copying that machinery into a second
file — a second parser for one artefact, which is the defect class this card is
about. So the reflow lands and the pin is reported as a follow-up rather than
bolted into the wrong file.
Reverse verification — four legs, each mutation proved on disk
Every literal in this card is green on today's constants, so a passing suite
proves nothing. Each leg records the HEAD blob hash, proves the mutation landed
by blob hash and by counting the removed and injected text, reads the
verdict only then, restores with
git checkout HEAD -- PATH, and proves therestore by an empty
git diff HEADplus a blob hash back at HEAD. All fourrestores verified.
CEILINGSinteraction40000 -> 41000BUFFER 0.05 -> 0.02~81k -> ~82kceiling 42,000Leg B is the proof that item 1 is real wiring and not a renamed copy: the
tolerance case "is within the ruled 5% buffer of what the gate measures today"
goes red under a moved
BUFFER, which a hand-copied0.05could not have done.Leg D is the proof against the actual history: restoring exactly the prose this
PR corrects turns the guard red, naming the row —
so the eleven days of silent falsehood could not repeat.
Leg A reddens exactly one assertion by design: the paragraph's claim is read
against the row's ceiling, not the committed one, because the assertion
above it already ties the row to
CEILINGS. One cause, one red, with the secondfiring next — when the row has been corrected and the paragraph over it has not.
Gates
pnpm verifygreen end to end onbc3ddd1, the commit this PR ships:tsc --noEmit --listFilesconfirms both edited files are in the typecheckprogram, so the green typecheck covers these edits rather than skipping them.
Nothing measured changed: the gate still reads business semantics ~82,489,
interaction layer ~37,431, authored total ~133,854. No ceiling, no
BUFFER, noREADME banner, and no
scripts/check-source-hygiene.mjsbyte was touched. Thechangeset carries empty frontmatter — comment and test-guard text only,
releasing nothing to HotCRM users.
Generated by Claude Code
Generated by Claude Code