Skip to content

Commit 84f6eb5

Browse files
committed
docs(scripts): point five gate scripts at lint.yml's idiom note instead of restating the #9465 fence
Seven sites in `scripts/**` stated the @changesets/cli v3 lane's fence as covering root `package.json` as a FILE (or, in the ratchet, root dependencies as a CLASS). The lane's own body scopes it to one dependency range and one script key, so those readings are false — #10894 corrected the same reading at nineteen sites inside `.github/workflows/lint.yml` and put the reasons in one place, the `GATE INVOCATION IDIOM` note. This is the half of that repair that `lint.yml` could not reach. Each site now points at that note rather than restating the scope, because restating it is the propagation mechanism the card measured: three of these docblocks were identically worded because their authors copied a neighbour's header, and a seventh careful restatement would be a seventh copy source. No wiring changes. The three self-test wiring assertions keep their predicate byte-identical (`lint.includes('node <self>\n')`); only the message string moved, and all three self-tests report the same assertion counts before and after (39 / 77 / 45). `scripts/check-step-collectors.mjs` is deliberately untouched — it already states the scope narrowly and is the model. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UjM2ia8Av1v5NqfqQEQmC6
1 parent 487e361 commit 84f6eb5

5 files changed

Lines changed: 34 additions & 24 deletions

scripts/check-aggregator-roster.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ async function selfTest() {
580580
{
581581
const lint = sources['lint.yml'];
582582
const self = 'scripts/check-aggregator-roster.mjs';
583-
assert(lint.includes(`node ${self}\n`), `wiring: lint.yml invokes ${self} directly (no root package.json alias -- #9465 fence)`);
583+
assert(lint.includes(`node ${self}\n`), `wiring: lint.yml invokes ${self} directly (lint.yml's GATE INVOCATION IDIOM note, not a package.json fence)`);
584584
assert(lint.includes(`node ${self} --self-test`), 'wiring: lint.yml runs the --self-test half too');
585585
}
586586

scripts/check-ci-filter-parity.mjs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,13 @@
115115
* ## Wiring
116116
*
117117
* Invoked from `.github/workflows/lint.yml` as `node scripts/...` directly, both
118-
* legs, rather than through a `pnpm check:*` alias: that alias belongs in root
119-
* `package.json`, declared territory of the @changesets/cli v3 migration lane
120-
* (#9465) while it runs. The self-test asserts that wiring against the workflow
121-
* text -- a gate that exists and is not scheduled is the same dormant shape from
122-
* the other side.
118+
* legs, rather than through a `pnpm check:*` alias: see the GATE INVOCATION
119+
* IDIOM note at the top of that file, which states the reasons once. It is NOT
120+
* because root `package.json` is off limits -- that reading of the #9465 fence
121+
* is false, and the note carries the fence's verbatim scope so this docblock
122+
* does not have to: restating it is how the wrong reading spread (#10894).
123+
* The self-test asserts that wiring against the workflow text -- a gate that
124+
* exists and is not scheduled is the same dormant shape from the other side.
123125
*/
124126

125127
import { readFileSync } from 'node:fs';
@@ -630,7 +632,7 @@ export async function selfTest() {
630632
failures.push(`cannot read .github/workflows/lint.yml to verify wiring: ${err?.code ?? err?.message}`);
631633
}
632634
if (lint !== null) {
633-
assert(lint.includes(`node ${SELF}\n`), `wiring: lint.yml invokes ${SELF} (no root package.json alias -- #9465 fence)`);
635+
assert(lint.includes(`node ${SELF}\n`), `wiring: lint.yml invokes ${SELF} directly (lint.yml's GATE INVOCATION IDIOM note, not a package.json fence)`);
634636
assert(lint.includes(`node ${SELF} --self-test`), 'wiring: lint.yml runs the --self-test leg too');
635637
}
636638

scripts/check-doc-frontmatter.mjs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,14 @@
208208
*
209209
* ## Wiring
210210
*
211-
* Invoked from `.github/workflows/lint.yml` as `node scripts/...` directly,
212-
* both legs, rather than through a `pnpm check:*` alias: that alias belongs in
213-
* root `package.json`, declared territory of the @changesets/cli v3 migration
214-
* lane (#9465) while it runs. The self-test asserts that wiring against the
215-
* workflow text -- a gate that exists and is not scheduled is the same dormant
216-
* shape from the other side.
211+
* Invoked from `.github/workflows/lint.yml` as `node scripts/...` directly, both
212+
* legs, rather than through a `pnpm check:*` alias: see the GATE INVOCATION
213+
* IDIOM note at the top of that file, which states the reasons once. It is NOT
214+
* because root `package.json` is off limits -- that reading of the #9465 fence
215+
* is false, and the note carries the fence's verbatim scope so this docblock
216+
* does not have to: restating it is how the wrong reading spread (#10894).
217+
* The self-test asserts that wiring against the workflow text -- a gate that
218+
* exists and is not scheduled is the same dormant shape from the other side.
217219
*
218220
* Adding the second root needed NO workflow edit: the step already invokes this
219221
* script, and `ROOTS` is read from here. `lint.yml` is the repo's busiest file
@@ -1220,7 +1222,7 @@ export async function selfTest() {
12201222
failures.push(`cannot read .github/workflows/lint.yml to verify wiring: ${err.code ?? err.message}`);
12211223
}
12221224
if (lint !== null) {
1223-
assert(lint.includes(`node ${SELF}\n`), `wiring: lint.yml invokes ${SELF} (no root package.json alias -- #9465 fence)`);
1225+
assert(lint.includes(`node ${SELF}\n`), `wiring: lint.yml invokes ${SELF} directly (lint.yml's GATE INVOCATION IDIOM note, not a package.json fence)`);
12241226
assert(lint.includes(`node ${SELF} --self-test`), 'wiring: lint.yml runs the --self-test leg too');
12251227
}
12261228

scripts/check-platform-checklist.mjs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,17 @@ const err = (file, id, msg) => errors.push(`${file}${id ? ` · ${id}` : ''}: ${m
105105
//
106106
// The battery runs inline, on every invocation, not only behind `--self-test`,
107107
// because a `--self-test` here would otherwise execute NOWHERE: this gate is
108-
// not CI-wired by maintainer decision (README "Operating cadence"), and its
109-
// `pnpm` alias lives in root package.json, declared territory of the
110-
// @changesets/cli v3 lane (#9465) while that runs. A self-test nothing runs is
111-
// the documented defect of #10574/#10573 — CI enforcing the spelling of a
112-
// guarantee while never once checking the guarantee still holds. The battery
113-
// is in-memory string work (~1 ms of a ~270 ms run), so "always" costs nothing
114-
// worth naming, and its assertion count is printed on the OK line: the green
115-
// states how many rows it read and that its own control passed.
108+
// not CI-wired by maintainer decision (README "Operating cadence"), so nothing
109+
// on a PR would ever reach a `--self-test` leg. NOT because its `pnpm` alias is
110+
// unavailable to it: `check:platform-checklist` is already a key in root
111+
// package.json, and the reading that the #9465 fence covers that file is false
112+
// -- the GATE INVOCATION IDIOM note at the top of `.github/workflows/lint.yml`
113+
// carries that lane's verbatim scope, and is not restated here. A self-test
114+
// nothing runs is the documented defect of #10574/#10573 — CI enforcing the
115+
// spelling of a guarantee while never once checking the guarantee still holds.
116+
// The battery is in-memory string work (~1 ms of a ~270 ms run), so "always"
117+
// costs nothing worth naming, and its assertion count is printed on the OK
118+
// line: the green states how many rows it read and that its own control passed.
116119

117120
const RUNNER_FILE = join(ROOT, 'docs/qa/platform-checklist/RUNNER.md');
118121
const TRAP_HEADING = '### Trap vocabulary';

scripts/check-skills-token-ratchet.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@
5454
* nobody edited a file is not a ratchet.
5555
* - NO DEPENDENCY. The workspace carries no tokenizer today (checked at
5656
* landing: no `tiktoken` / `gpt-tokenizer` / `gpt-3-encoder` in any
57-
* manifest), and root dependencies are fenced (#9465). Adding one to make a
58-
* lint gate's numbers prettier is not a trade this gate needs.
57+
* manifest). Adding one to make a lint gate's numbers prettier is not a
58+
* trade this gate needs. Refused on that merit alone, not by a fence: root
59+
* dependencies as a CLASS are not #9465 territory -- the GATE INVOCATION
60+
* IDIOM note at the top of `.github/workflows/lint.yml` carries that lane's
61+
* verbatim scope, and it is pointed at rather than restated here.
5962
* - INDEPENDENTLY REPRODUCIBLE. Anyone can audit a ceiling without running
6063
* this script: `ceil($(wc -c < file) / 4)`. A tokenizer's count can only be
6164
* checked by re-running the tokenizer.

0 commit comments

Comments
 (0)