From 491624d24cca45e6ac9c5c6d350aae7e35a14037 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 02:18:29 +0000 Subject: [PATCH] Run seven lint gates through their root check:* alias Each of these steps spelled out the same command its root package.json alias holds, so the two copies could drift. The steps now run the alias, and the system-context census self-test pins the alias instead of the inline lines. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01ADHkmQq9EYQdTQwmRutQTS --- .github/workflows/lint.yml | 29 ++++++++++--------------- scripts/check-system-context-census.mjs | 21 +++++++++++++----- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ef97c1dc1b9..9b8a1c11025 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -631,15 +631,14 @@ jobs: # and it is the only instrument on this gate's matching rules -- a clean # tree cannot tell a working rule from a weakened one. # - # Invoked as `node` rather than through a `pnpm check:*` alias: see the - # GATE INVOCATION IDIOM note at the top of this file. + # Invoked through its `pnpm check:*` alias, so root `package.json` is the + # one definition of the command (#26086). - name: Docs anchors resolve to real headings id: docs-anchors-resolve-to-real-headings continue-on-error: true run: | pnpm check:doc-anchors - node scripts/check-system-context-census.mjs --self-test - node scripts/check-system-context-census.mjs + pnpm check:system-context-census # #3723 ADR anchors: code an accepted ADR governs must keep naming it. # That incident reversed three accepted ADRs with a patch-level changeset, @@ -908,24 +907,20 @@ jobs: # tell a working matcher from a dead one, and the specifier FLOOR is the # other half (a dead matcher finds nothing, and nothing is what success # looks like — so it refuses with exit 2 rather than passing). - # Invoked as `node` rather than through a `pnpm check:*` alias: see the - # GATE INVOCATION IDIOM note at the top of this file. + # Invoked through its `pnpm check:*` alias, so root `package.json` is the + # one definition of the command (#26086). # Scans ~2k non-test src files across 78 workspace packages, no spawns; ~1s. - name: Published src imports only declared workspace deps id: published-src-imports-only-declared continue-on-error: true - run: | - node scripts/check-undeclared-dep-imports.mjs --self-test - node scripts/check-undeclared-dep-imports.mjs + run: pnpm check:undeclared-dep-imports # Rationale: `scripts/check-keyed-text-bounds.mjs` header (#12147, #11374, #12058, # #12143). - name: Keyed text-family columns declare their bound (#12147) id: keyed-text-family-columns-declare continue-on-error: true - run: | - node scripts/check-keyed-text-bounds.mjs --self-test - node scripts/check-keyed-text-bounds.mjs + run: pnpm check:keyed-text-bounds # Rationale: `scripts/check-bash32-floor.mjs` header (#12221). - name: shell scripts hold the bash 3.2 floor @@ -1968,9 +1963,7 @@ jobs: - name: Platform-object tenancy census matches the tree id: platform-object-tenancy-census-matches continue-on-error: true - run: | - node scripts/check-platform-object-tenancy-census.mjs --self-test - node scripts/check-platform-object-tenancy-census.mjs + run: pnpm check:platform-object-tenancy-census # ── THE LANE'S VERDICT (#23191): the last step, and the one that keeps a # red gate red. The EVERY GATE RUNS note above `jobs:` argues it. ───── @@ -3593,7 +3586,7 @@ jobs: - name: Declared registry log level id: declared-registry-log-level continue-on-error: true - run: node scripts/check-registry-log-declared.mjs --self-test && node scripts/check-registry-log-declared.mjs + run: pnpm check:registry-log-declared # The same defect one package down (#15484). `packages/rest`'s own fault # logging hands whole `Error` objects to `console.error`, and Node prints @@ -3608,7 +3601,7 @@ jobs: - name: Declared REST fault-log level id: declared-rest-fault-log-level continue-on-error: true - run: node scripts/check-rest-log-declared.mjs --self-test && node scripts/check-rest-log-declared.mjs + run: pnpm check:rest-log-declared # The pairing half of the one above (#17865, ruling batch #128 item 4). # The `packages/rest` harness now runs at `OS_REST_LOG: 'silent'`, which @@ -3623,7 +3616,7 @@ jobs: - name: Declared REST fault-log level — observers id: declared-rest-fault-log-level-observers continue-on-error: true - run: node scripts/check-rest-log-spy-declared.mjs --self-test && node scripts/check-rest-log-spy-declared.mjs + run: pnpm check:rest-log-spy-declared # Rationale: `scripts/check-live-db-isolation.mjs` header (#10382, #9350). - name: Live-server database isolation diff --git a/scripts/check-system-context-census.mjs b/scripts/check-system-context-census.mjs index a23d291fdbe..577f282b4aa 100644 --- a/scripts/check-system-context-census.mjs +++ b/scripts/check-system-context-census.mjs @@ -207,13 +207,13 @@ * has it run, so deleting BOTH invocations from `lint.yml` now reds there through * `check:system-context-census` -- but deleting the production invocation alone * still retires this gate with every check green. The self-test therefore reads - * the workflow text and asserts both legs, the way `check-doc-frontmatter`, + * the workflow text and the root alias it runs (#26086) and asserts both legs, the way `check-doc-frontmatter`, * `check-aggregator-roster` and `check-ci-filter-parity` each assert their own -- a * gate that exists and is not scheduled is the dormant shape seen from the other * side. * * ⚠️ The pin deliberately needs NO workflow edit: `lint.yml` already invokes both - * legs, in the required `Lint & Repo Gates` job, on a trigger set that includes + * legs (through the alias), in the required `Lint & Repo Gates` job, on a trigger set that includes * `merge_group` and with no `paths:` filter. It is the repo's busiest file and the * assertion reads it rather than adding to it. */ @@ -2305,11 +2305,22 @@ function selfTest() { t(`WIRING: .github/workflows/lint.yml is readable`, false, err.code ?? err.message); } if (lintYml !== null) { + // CI runs the root alias (#26086), so the alias is where both legs live. t( - 'WIRING: lint.yml invokes this gate directly (the GATE INVOCATION IDIOM, not a package.json fence)', - lintYml.includes(`node ${SELF}\n`) + 'WIRING: lint.yml invokes this gate through its root alias', + /^\s*pnpm (run )?check:system-context-census\s*$/m.test(lintYml) + ); + let alias = null; + try { + alias = JSON.parse(readFileSync(join(ROOT, 'package.json'), 'utf8')).scripts?.['check:system-context-census'] ?? null; + } catch (err) { + t('WIRING: root package.json is readable', false, err.code ?? err.message); + } + t( + 'WIRING: the alias runs the --self-test leg, then the gate', + alias === `node ${SELF} --self-test && node ${SELF}`, + alias ); - t('WIRING: lint.yml runs the --self-test leg too', lintYml.includes(`node ${SELF} --self-test`)); } // ── POPULATION DECLARATION: what the dispatch derivation is told this gate reads ──