Skip to content

fix(pm): name the ratchet invocation CI runs in dispatch-gates' test-file entry - #8611

Merged
hotlong merged 2 commits into
mainfrom
claude/issue-8545-ratchet-invocation-name
Aug 14, 2026
Merged

fix(pm): name the ratchet invocation CI runs in dispatch-gates' test-file entry#8611
hotlong merged 2 commits into
mainfrom
claude/issue-8545-ratchet-invocation-name

Conversation

@hotlong

Copy link
Copy Markdown
Contributor

Fixes#8545
Fixes#8604

No gate is weakened and no invocation is removed from CI. What changes is what the DERIVATION prints.

The mismatch

CHANGE_KIND_GATES's test-file entry emitted check:type-check-coverage under a rationale describing the TEST_DEBT ratchet. The ratchet is the --re-measure half, and only check:type-check-debt passes it — both resolve to one script, scripts/check-type-check-coverage.mjs. Measured on the merged ref: lint.yml runs pnpm check:type-check-coverage at line 1021 and pnpm check:type-check-debt at line 1449, the latter immediately after a pnpm exec turbo run build step that builds the ledgered packages' closure.

What the entry emits now

Both invocations, each stating the question it answers:

  • check:type-check-coverage — the structural half. A package whose test files sit outside every tsc program accounting for it must carry a TEST_DEBT entry, so a new test file no tsconfig reaches moves it. It re-measures no count.
  • check:type-check-debt — the ratchet half, and the invocation CI runs for it. Carries the built-closure prerequisite inline, with the exact build command lint.yml runs before that step, and says the cold-worktree refusal means NOT MEASURED, never "not applicable to me".

A new How these entries stay honest bullet writes down the general rule: every name in that table is an INVOCATION, not a script.

The class sweep the card asked for

Swept over the merged ref: the workflows discover 96 check families resolving to 73 distinct script files; 8 of those files are reached by more than one family. Seven of the eight are a different shape — a root check: script beside a direct node scripts/check-x.mjs step in a second workflow (the three changeset gates, cross-package-test-inputs, objectui-pin-fresh, partof-closing-keyword, shard-attestation). The derivation already discovers each of those direct invocations as its own family and prints it with its own runnable invocation, so nothing is misdirected there. check-type-check-coverage.mjs is the only file whose two CI invocations are two ROOT SCRIPTS differing by a flag, and the only one this table names. One-off today; the rule is what generalises, not the fix.

Pins

The self-test grows from 103 to 106 cases. All three convention gates are pinned on the rendered delimiters (- pnpm x —), never a bare substring, and the STALE branch is pinned per NAME (⚠ x: STALE) so the pair sharing one script is reported apart. One further case holds the ratchet line's prerequisite text (the built-closure condition plus a runnable turbo run build), because an unexplained throw is what reads as "not applicable".

Reverse verification, direction predicted before running, from the committed state:

  • rename both gates to -v2: exactly the 4 anchored cases go red, both COUNT pins stay green (that blindness is why the anchors exist), and the live run prints both names as STALE — the STALE branch works for both printed names.
  • delete the ratchet entry (the pre-fix shape): 5 cases red, including both count pins.

Restored from the commit afterwards, byte-identity confirmed with git hash-object against HEAD:scripts/pm/dispatch-gates.mjs.

Rider, #8604 — comment-only, no executable change

scripts/pm/check-dispatch-gates.mjs's header justified its unquoted repo paths with "watch-hint extraction ... does not skip comments". extractWatchHints has opened with maskComments since #8478, and that function's docblock names this file as the specimen it retires.

Measured with extractWatchHints, every repo path in the header rewritten into backticks: 1 hint under today's extractor (the module-body constant, the same single hint the file ships with) against 10 under the pre-masking extractor, reaching spec, objectql, plugins, drivers, .claude/agents and .changeset exactly as the incident describes. Comment masking alone accounts for the difference; masking self-test bodies instead changes nothing here, because this file has none. So the premise holds: the convention is no longer load-bearing. The incident is kept as history, the ⚠️ instruction line is dropped, and the rule that survives is stated — a module-body literal is what masking cannot reach.

The separate-gate-file argument in the same header gets today's numbers too: the tool's own source yields 4 hints, not the 49 the header records, and three of them (packages/plugins, packages/drivers, packages/services) are directory bases the package resolver really probes and wide enough that a directly-wired gate would still fabricate leads — so that decision stands, on narrower grounds than the text claimed.

One measured detail worth keeping: the ratchet line's remedy command spells its --filter values unquoted (and says to quote them for the shell) because a why string is a MODULE-BODY literal that masking cannot reach — the shell-quoted spelling adds both glob values to this file's own hint set, inert today only because hintCovers rejects a hint collapsing to a bare top-level directory.

Verification

  • pnpm check:pm-dispatch-gates — 106/106 pass
  • pnpm check:nul-bytes — OK, 7757 files scanned; plus a targeted control-byte self-scan of both changed files
  • pnpm exec eslint on both changed files — clean
  • re-derived with node scripts/pm/dispatch-gates.mjs against the actual changed paths: check:pm-dispatch-gates only, nothing beyond the dispatched list

Dev tooling only (scripts/pm/), releases nothing — skip-changeset.

Related: #8442 / #8533 (where the misdirection cost a CI lap), #8478 (the masking), #6376 (why --re-measure demands a built closure), #5278 (the shrink-only rule). #8538 is a different finding about the same script family and remains open; it is not addressed here.


Generated by Claude Code

…st-file entry
The convention entry for a change that adds a test file emitted
check:type-check-coverage with a rationale that describes the TEST_DEBT
ratchet — a half only check:type-check-debt (--re-measure) runs. A dev
seat that ran the named command in good faith reported green while the
ratchet had never run locally; CI then found four new type errors.
Both invocations are now emitted, each stating the question it answers,
and the ratchet line carries its built-closure prerequisite inline with
the exact build command lint.yml runs before that step — an unexplained
throw on a cold worktree reads as "not applicable to me".
Fixes#8545
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WuTtyckQa1VcXwgd52JpN
…d fix the sweep count
The header justified its unquoted repo paths with "watch-hint extraction
... does not skip comments". extractWatchHints has opened with
maskComments since #8478, and that function's docblock names this file as
the specimen it retires — so the file carrying the workaround was still
explaining it as live behaviour.
Measured with extractWatchHints, every repo path in the header rewritten
into backticks: 1 hint today (the module-body constant, the same hint the
file ships with) against 10 under the pre-masking extractor. Comment
masking alone accounts for it. The incident is kept as history, the
section now says the convention is no longer required, and the rule that
survives is stated: a module-body literal is what masking cannot reach.
The separate-gate-file argument gets today's numbers too — 4 hints, not
49, and three of them are directory bases wide enough to keep the
decision standing on narrower grounds.
Fixes#8604
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WuTtyckQa1VcXwgd52JpN
@vercel

vercelBot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectstackIgnoredIgnoredAug 14, 2026 1:57am

Request Review

@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 14, 2026 — with Claude
@hotlong
hotlong marked this pull request as ready for review August 14, 2026 02:16
@hotlong
hotlong added this pull request to the merge queueAug 14, 2026
Merged via the queue into main with commit 3753764Aug 14, 2026
25 checks passed
@hotlong
hotlong deleted the claude/issue-8545-ratchet-invocation-name branch August 14, 2026 02:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@hotlong@claude