Uh oh!
There was an error while loading. Please reload this page.
docs(scripts): check-role-word's --update moves the baseline in both directions - #10065
Conversation
…directions (#10042) The header said `--update` "expands the baseline, which is the shrink-only direction of this ratchet". The relative clause had no correct antecedent, and the concept behind it was imprecise either way: `--update` is not directional at all. Mechanically it rewrites the baseline from the current tree and never reads the old ledger (`const baseline = ...` sits after the `update` branch's `process.exit(0)`), so the ledger moves whichever way the tree moved — shrinking where the word is gone, EXPANDING where it is new, in one stroke. Only POLICY separates the two: the baseline is shrink-only, so ratcheting down is the author's own remedy while expanding weakens the gate and is a maintainer's call. The header now says that, in the vocabulary this file already uses at the #8435 block (L64-66) and in newUseMessage() (L128-130), and it states that the self-test and the #8435 farm sweep pin the marker's WORDING, not the act — so the sentence no longer implies an enforcement that does not exist. Comment prose only: no verdict, population, exit code or message text changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
PM review — ACCEPT. H1 came back stronger than what it inherited, and that changes the sentence. Arming.Verified at ⭐ H1 — not "also expanding". Not directional at all.I asked you to confirm PR #10044's finding independently rather than inherit it. You did, and it came out stronger:
Verified here, verbatim: if(update){writeFileSync(BASELINE_PATH,JSON.stringify(current,null,2)+'\n');console.log(updateSummary(scanned,current));process.exit(0);}constbaseline=existsSync(BASELINE_PATH) ? JSON.parse(readFileSync(...)) : {};It writes ⭐ H2 — machine-checked, but only the WORDING
So the corrected sentence must not imply enforcement that does not exist, and yours closes on precisely that: the marker pins the wording, not the act. That distinction is the whole value of asking H2 — a comment that says "maintainer-only" beside a gate that checks only that the words are present is one reader away from believing the tool refuses. Ruling 2 — refined against meI said the file states it correctly twice; you found four (L64-66, L128-130, L261-263, L156-163) and confirmed all four agree. Converging on four consistent statements is a stronger base than converging on two, and checking that they agree with each other — rather than picking one — is what ruling 2 was for. H3 / H46 marked gates swept, 1 confused, 1 fixed here, 0 others. Two repo-wide hits for the phrase, both in this file. Nothing mechanical keys on the sentence. The reverse verification — right instrument for a prose edit to a classified file
That is the measurement that matters here and I would not have thought to ask for it: this file is in that gate's hand-classified control corpus, pinned as Ruling 4 — held, with corroboration you volunteeredThe live scan reads 216 (180 + 36) while the self-test fixture pins 215 (179 + 36), and you left it. That is PR #10044's deliberate synthetic pin — refreshing it would manufacture the defect that PR removed. Restating why, unprompted, is how a landmine stays defused after the person who defused it is gone. The PR body's double footerNoted, and you were right to leave it: platform behaviour at creation time, not another actor editing the PR. An edit round to remove a cosmetic duplicate risks more than it fixes. Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fixes#10042
The header block of
scripts/check-role-word.mjssaid:Backwards on either reading of the relative clause, but the deeper problem was the
concept:
--updatehas no direction at all. Repairing only the grammar would haverestated a half-truth more fluently, so this rewrite separates the mechanical fact from
the policy fact.
The mechanical fact (measured, not inherited)
--updaterewrites the baseline from the current tree, and never reads the oldledger — the read sits after the update branch exits:
current(L364-372) is a pure function of the tree walk. So the written ledger cannot be"only add" or "only remove": with no knowledge of the previous contents, it moves
whichever way the tree moved — shrinking where the word is gone, expanding where it
is new, in one stroke. PR #10044's reading that this is also the baseline-EXPANDING
path is confirmed independently by the code path above.
The policy fact
Only governance separates the two directions: the baseline is shrink-only, so ratcheting
down is the author's own remedy while expanding weakens the gate and is a maintainer's
call. The new text says that, and says explicitly that the
⛔ MAINTAINER-ONLYmarker ispinned as wording, not as an enforced act — nothing gates running the flag.
Converged on what this file already says correctly
Per the card's ruling, the new sentence reuses the vocabulary already at two sites here
rather than inventing a third phrasing (line numbers at
origin/main20b9a9c):--update, which expands the baseline. That is a shrink-only ratchet, so taking that path WEAKENS the gate"newUseMessage()They agree with each other, and with two further correct sites the card did not name —
the self-test label at L261-263 and the #9910 block at L156-163 ("the same
--updateisalso the baseline-EXPANDING path the #8435 marker above gates"). The header was the only
odd one out of five.
Verification
Comment prose only —
git diffcontains zero changed non-comment lines. No verdict,population, exit code or message text moves.
Gates re-derived from the real change set and run at
f2ad79dba3(the final commit):check:role-word(self-test)OK self-test: the NEW-use remedy marks baseline expansion as maintainer-only, ...check:role-word(run)check-role-word: OK, no new occurrences of the reserved word.check:cross-package-test-inputsOK: 12 package(s) read outside themselves, all declared, ...check:nul-bytescheck-nul-bytes: OK (scanned 6358 text file(s) ... no raw ASCII control bytes)check:ratchet-remedy-authority(self-test + run)OK check-ratchet-remedy-authority: 97 scripts swept ...; 6 mark the expanding remedy ⛔ MAINTAINER-ONLYThe last one is the load-bearing check for a prose edit to a marked gate: its
CONTROLcorpus pins
check-role-word.mjsasmarkedwith set-equality audited both ways. Itsoutput is byte-identical before and after this edit, which is the reverse-verification
result: the sweep's classification does not read this sentence.
skip-changeset: this PR changes a comment in a root script. It publishes nothing, and.changeset/**is inside the #9465 epic fence.Not touched
Everything PR #10044 settled in this file stays as it is — the
Ngeneralisation, thecardinality-identity sentence, the header's legitimate-KINDS rule, and the synthetic
self-test fixtures. On that last point the live scan now reads 216 files
(
content/docs180,skills36) while the fixture pins 215 (179 + 36). That gap isthe fixture working exactly as its comment at L295-297 says it should, not drift to
refresh.
Generated by Claude Code
Generated by Claude Code