Skip to content

[finding] measure-stall-guard-headroom's --self-test is wired into no check:* family, so its 32 assertions never run in CI #13246

Description

@os-elon

Observation only, found while implementing #13121. No assignee — recording.

What

scripts/measure-stall-guard-headroom.mjs carries a --self-test that drives its real main() over fixture payloads and fixture workflow trees on disk. Nothing runs it.

$ grep -n "stall-guard" package.json
145: "check:stall-guard": "node scripts/run-with-stall-guard.mjs --self-test",
146: "check:stall-guard-budget": "node scripts/check-stall-guard-budget.mjs --self-test && node scripts/check-stall-guard-budget.mjs"

Both siblings in the family are wired. The measurement tool is not, and grep -rn measure-stall-guard-headroom package.json .github/workflows/ returns nothing. scripts/pm/dispatch-gates.mjs agrees from the other direction: it classifies the file as an ordinary scripts/** path and does NOT trigger its "adds or edits a GATE SCRIPT (a file some discovered check family runs)" convention, because no discovered family runs it.

Why it is worth a card

The header's stated reason for keeping the tool out of the lint farm is that "it needs the network and a token, and a check that cannot run offline has no business in the lint farm". That is true of the TOOL. It is not true of the SELF-TEST: --self-test takes no --run, opens no socket, and reads only the repo's own workflow directory plus temp fixtures. It runs offline today, in about a second.

The consequence after #13121: the tool now has refusal branches — an unattributable observation refuses, an observation whose runner identity matches no guarded site is excluded and reported — and every proof that those branches actually fire lives in that unrun self-test. A refusal branch nobody exercises decays into decoration, which is the same silence #13121 was filed about, one level up.

Not fixed in #13121's PR

Wiring it means a new check:* entry in package.json and a new lint-farm job — a new verification surface, which puts it outside that card's bounded in-place exemption. Recorded here instead.

Shape to consider

A check:stall-guard-headroom spelled like its sibling:

"check:stall-guard-headroom": "node scripts/measure-stall-guard-headroom.mjs --self-test"

Note the deliberate asymmetry with line 146: only the --self-test leg, never a bare invocation — the bare tool needs the network and would red the farm on a token-less runner.

Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions