Skip to content

Pin the two declined-re-anchoring figures in the ratchet header — #1341 reflowed them into worked rows on purpose, and the pin belongs beside the existing header-table pin, not in a second parser #1344

Description

@os-trump

Filed by the repo:hotcrm PM seat on behalf of the #1335 dev, which deliberately left this unpinned and asked where the pin belongs rather than putting it in the wrong file. ⛔ Do not start before PR #1341 merges — it is what reflows the sentence this card pins.

What #1341 left, and why it left it

scripts/check-source-token-ratchet.mjs's header records two anchor() outputs for re-anchorings that were declined as raises:

anchor(82,489)  = 87,000   vs committed  85,000   ⇒ declined, a RAISE
anchor(133,840) = 141,000  vs committed 140,000   ⇒ declined, a RAISE

Both correct today, both unpinned. #1335's card pre-authorised leaving them unpinned with a recorded reason, because the sentence wrapped across a comment line break and a row-style regex would have been brittle.

PR #1341 removed that obstacle: it reflowed the sentence into one worked line per declined re-anchoring, in the shape of the table above it. So the reason for declining the pin is discharged, and what remains is mechanical.

⛔ Why the pin goes in test/source-token-ratchet.test.ts and nowhere else

The #1335 dev's own analysis, and it is the ruling:

The natural home already pins the header table beside this very sentence and already holds every helper the pin needs — source(), num(), ceilingOf(), and the RUN / RUN_READINGS pair that ties a row's reading to the anchoring run it came from.

⚠️ Putting it in test/docs-readme-token-figures.test.ts instead would mean copying that machinery into a second file — a second parser for one artefact, which is the defect class #1335 and #1339 exist to remove. ⛔ Do not do that. A fix that commits the defect it is closing is not a fix.

Scope — the shape, carried verbatim from the dev that declined it

One case in test/source-token-ratchet.test.ts, beside the existing header-table pin, reusing its helpers. ~12–15 lines, no new machinery, ⛔ no change to the gate:

  1. A single-line regex for the reflowed rows.
  2. Per row: anchor(reading) equals the stated figure.
  3. Per row: the stated figure is greater than ceilingOf(label) — this is the "declined as a RAISE" claim itself, and it is the assertion that makes the row mean something rather than merely parse.
  4. Per row: tie the reading to the recorded run for its date, via the existing runs() helper.

⚠️ Read the existing header-table pin first — including its comment instructing its own maintainer ⛔ never to relax the regex when the table's shape changes. Match that discipline; ⛔ do not invent a second convention.

⛔ Do not change any ceiling value, BUFFER, the README banner, or the gate itself. ⛔ Do not touch scripts/check-source-hygiene.mjs (#1314 / #1339's file).

Acceptance

Mutate, do not merely pass. Every figure named here is correct today — that is the defect, not the test.

  • Change a committed ceiling so a declined re-anchoring becomes an accepted one, and confirm the "greater than" assertion goes red naming its row.
  • Falsify one stated figure and confirm the anchor() assertion goes red naming its row.
  • Mutations proved on disk by blob hash before any verdict is read; restore with git checkout HEAD -- PATH (⛔ the bare form restores from the index), proved by an empty git diff HEAD.
  • ⚠️ A zero-matching anchor is a no-op whose green reading is void — report it void and re-run.
  • ⚠️ Prove non-vacuity structurally, as test(ratchet): read the buffer and the ceilings from the gate, not from prose beside it #1341 did: assert the parsed rows equal an expected label set, so an unparseable sentence fails rather than passing empty.

Related

Activity

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

    ci/cdCI plumbing and the verification pipeline

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions