feat(ratchet): rule the business-semantics ceiling to 100,000 and decouple the README banner - #1606
Merged
Merged
Conversation
…ouple the banner Raise CEILINGS['business semantics'] 85,000 -> 100,000 on the 2026-09-05 maintainer ruling, quoted verbatim in the PR body as this gate's header requires. The interaction layer and the authored total are untouched. Introduce the distinction the raise forces: a ceiling is now either ANCHORED (anchor(reading), shrink-only, owes a worked row) or RULED (a maintainer grant, derived from no reading). No real reading anchors to 100,000 -- that needs one between 94,286 and 95,238 and the tree measures 84,579 -- so the header records the ruled kind and writes no worked row rather than fabricating a reading. Decouple the README banner from the ceiling. The banner rule was asserting that each layer's band closed above its ceiling and reasoning that the ratchet failed first on growth; that coupling would have made the banner band the effective cap and defeated the raise. It is re-aimed, not deleted: the banner must track the MEASURED reading within the ruled buffer. The case tying each row's restated ceiling to CEILINGS stays. Both banner figures move to the measurement -- business semantics ~81k -> ~85k, interaction layer ~39k -> ~37k -- because it is one rule and leaving a row on the old basis would mean two. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018xtjdpZFjgWh4Ad9Wcx68J
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…chet-reanchor-100k
This was referenced Sep 5, 2026
The suite modelled every ceiling as anchor() of a measured reading, so a maintainer grant could not be expressed in it at all: the "one worked row per committed ceiling" case went red on the ruled row no matter how the header was written, and no honest reading exists that anchors to 100,000 (that needs 94,286..95,238; the tree measures 84,579). Teach it the second kind rather than relax it. RULED_ROW parses a granted ceiling; the roster case now merges both kinds on document position, so it still asserts one row per committed ceiling in the committed order and remains the vacuity guard for both parsers. Every anchored-row case is untouched. The new case is an added invariant, not a weaker one: a ruled row's ceiling must be the committed constant, and no reading recorded in the header may anchor to it. Stated that way on purpose -- "no integer anchors here" is false of every multiple of 1,000, so the checkable claim is that the readings this file records did not produce the constant. That is what stops a ceiling being filed as ruled to dodge arithmetic that did in fact apply. Ruled ceilings are outside the declined-as-a-raise ledger by construction, which is now stated where that case reads its input. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018xtjdpZFjgWh4Ad9Wcx68J
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018xtjdpZFjgWh4Ad9Wcx68J
os-steve
marked this pull request as ready for review
September 5, 2026 23:38
This was referenced Sep 5, 2026
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 #1601
pnpm verifyis green, all eight stages, including both suites that importCEILINGS/BUFFERpassing on their re-expressed relations.The maintainer ruling, quoted verbatim
scripts/check-source-token-ratchet.mjs's own header requires the ruling to bequoted in the PR that raises a ceiling. Verbatim and untranslated:
The shape it was given, from the same exchange, 选项 A:
What changed
scripts/check-source-token-ratchet.mjsCEILINGS['business semantics']85,000 -> 100,000; header docblock re-written for the decoupled shapetest/docs-readme-token-figures.test.tstest/source-token-ratchet.test.tsREADME.md.changeset/ratchet-ruled-ceiling-banner-pins-the-measurement.mdpatchinteraction layer(40,000) andauthored total(140,000) are untouched —the ruling names one layer.
Measured on the merged tree
The gate's own Headline line now prints
business semantics ~85k · interaction layer ~37k, which is exactly what the README banner states. Re-measured twice:on the original base
a4e5ea3e(84,579 / 37,429 / 136,349, identical to thedispatch) and again after merging
8223d0aa, where #1605 movedsrc/viewsandcarried the interaction layer 18 tokens. It stays well inside the ~37k band, so
no banner figure needed re-cutting — the 5% buffer absorbing routine churn is
exactly its ruled purpose.
Decoupling, and why it is not a constant change
The banner rule asserted
row.high > row.ceiling— each layer's banner band hadto close above its committed ceiling — and reasoned from that the ratchet would
fail first on growth. With the coupling intact, raising the ceiling would not
have created headroom: the banner band's upper edge (85,050) would have become
the effective cap, and the assertion would simply have gone red. So the two
numbers are separated and each gets one job. The ceiling is the growth budget,
alone. The banner rule becomes a truthfulness rule: the README figure must track
the measured reading within the ruled 5% buffer. It caps nothing.
The case is re-aimed, not deleted, and the case tying each row's restated
ceiling to
CEILINGSstays — that is what stops the README quoting a ceilingthe gate no longer commits. Both banner rows move to the measurement, because it
is one rule and leaving a row on the old basis would mean two rules with no way
to tell which governs.
A ceiling can now be RULED rather than anchored
Every ceiling until now was
anchor(reading)— a reading the gate printed, plusthe buffer, rounded up to the next 1,000. A maintainer grant is derived from no
reading, and on this layer none could derive it:
So the header records a ruled ceiling and deliberately writes no worked
row for it, rather than reverse-engineering a reading that would produce the
constant. Fabricating a reading here would have been two layers of falsehood —
the row, and the anchoring run the row's date would have had to point at.
test/source-token-ratchet.test.tsmodelled every ceiling asanchor()of ameasured reading, so it could not express a grant at all. It now learns the
second kind:
RULED_ROWparses a granted ceiling — label, constant, ruling date; the prosebetween them is free, exactly as
TABLE_ROW's column widths are.one row per committed ceiling in the committed order, and remains the vacuity
guard for both parsers.
constant, and no reading recorded in the header may anchor to it. Stated
that way deliberately — "no integer anchors here" is false of every multiple of
1,000, so the checkable claim is that the readings this file records did not
produce the constant. That is what stops a ceiling being filed as "ruled" to
dodge arithmetic that did in fact apply.
"declined as a raise" ledger by construction, which is now said where that case
reads its input.
Evidence
All runs started after the last edit's mtime; exit codes captured by redirect
first, then
$?— never through a pipe.pnpm validatepnpm typecheckpnpm lintpnpm lint:i18n-gatepnpm hygienepnpm hygiene:tokenspnpm buildpnpm testWhat each run establishes.
test/docs-readme-token-figures.test.tsprovesthe re-aimed banner rule holds against a live gate reading — it runs the gate in
--jsonmode and never hard-codes a figure.test/source-token-ratchet.test.tsproves the header still derives from the constants for both anchored rows (its
anchor(reading), headroom/percentage, run-dating and declined-raise cases allpass unchanged) and that the ruled row is a grant no recorded reading could
have produced.
Reverse verification, three ablations, each from the committed tree
Every leg: mutate, prove it reached disk by
grep -con both the injected andthe removed text, run, then restore under an
EXIT INT TERMtrap and prove therestore by blob hash, not by an exit code.
1. The re-aimed banner case. README banner and its worked row moved together
to ~95k — which keeps the banner-quote, band-edge and ceiling cases green, so
only the new relation is under test:
2. The new ruled invariant. The 2026-08-17 run's recorded business-semantics
reading changed 80,356 -> 95,238, which does anchor to 100,000. Exactly one
case fell:
3. The vacuity guard for the new parser. The ruled row deleted outright:
Restores verified:
scripts/check-source-token-ratchet.mjsback to8bb0b432…,README.mdto0ea08478…,test/docs-readme-token-figures.test.tsto
65f86a16…;git diff HEADempty after each.are pinned to the README banner and to
BUFFER, someasured in bandisentailed by the tolerance case. It can fail, so it is not a tautology, but it is
a row-level restatement holding the published, rounded band accountable rather
than an independent relation. I considered pinning the inverted relation
instead (
row.highbelowrow.ceiling, true on both layers now and genuinelyindependent) and rejected it: making the banner rule's verdict depend on the
ceiling again is precisely the coupling 「解耦」 removed. Ablations 2 and 3 do
each fire alone.
Two consequences recorded, not silently absorbed
headroom is over twice the buffer, so every run prints
re-anchor this ceiling to ~89,000 in your PR. Following it hands back theheadroom the ruling created. The header now states plainly that a ruled
ceiling is not tightened on that line alone — it moves on another ruling,
or on a PR that genuinely shrinks the layer and says so. ⛔ The advisory's
firing condition is unchanged: changing when a gate speaks is its own
decision, and the seat is filing it separately, fenced behind this PR.
it. It expected "on growth the ratchet fails first" to become true by
construction. It becomes false: both bands now close below their ceiling
(89,250 vs 100,000; 38,850 vs 40,000), so the banner rule reddens first on
both layers. Not the coupling returning — the two reds are paid in different
currencies (a README restatement any PR may do, against a shrink or a ruling).
The re-written paragraph therefore stops reasoning from that comparison
altogether rather than asserting its inverse.
Guardrails observed
100,000/100000/$100K— the opportunityapproval threshold in
content/docs/**andtest/deal-threshold-parity.test.tsis untouched. Only
CEILINGSand the token-figure surfaces moved.mainfooter comment (landed shortly before this branch) isuntouched; the docblock work is the re-anchoring block near the top.
src/. ⛔ No new gate built — an existing suite learned aconcept and gained an invariant. ⛔ Only the two
test/**files the claim andthe seat's ruling name; no deletions in
test/**./docs/…links introduced inREADME.mdor the changeset.grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'clean onall five files.
claim comment — the seat lands it.
Generated by Claude Code