Repository navigation
fix(ci): make pre-install-import-graph.yml point at its population instead of counting it - #8995
Conversation
…stead of counting it The header sentence described the run as one `node` call over a literal number of workflow files. That population is not an estimate the gate may be vague about: scripts/check-pre-install-import-graph.mjs DERIVES it from `.github/workflows/` (WORKFLOW_DIR, readWorkflows), so the header and the gate were the same measurement written twice and only one of them was live. Measured on 4d65991: the header said 24, the directory holds 36. The sentence now names the directory and the command that prints the reading (`--list`), so adding a workflow cannot falsify it. Its adjacent hand-count of `scripts/` gates ("a dozen", actually 26 distinct) goes the same way. Second half, which is the durable one: objectui#7448 document-count pin family gains a FOURTH carrier, in the gate test that already owns this workflow. Two independent things had to be true for the family to miss this count, and both were - no pin read this header, and the count wrapped a comment line, so a per-line unit could not have seen it either. The unit is therefore stripped comment prose (marker removed, then joined), the same extraction all three existing copies run and the same subtlety objectui#8629 measured from the documentation end. Both legs of the unit are asserted so "clean" can never again mean "unreadable", and the pin carries positive controls plus a prose floor so an empty scan is a reading rather than a silence. No existing pin, threshold, check or scan surface was weakened. Refs: objectui#8606 Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Armed — SQUASH, in the queue, probe written BEFORE the merge
CI on The probeBaselines on
⭐ A and B are the same sentence from both sides — the point of this card is that the literal goes away, ⛔ not that a pointer is added next to it. Only the pair distinguishes a replacement from an addition. ⭐ C is the floor leg. This card's authorisation was to strengthen the instrument and ⛔ never to weaken one. 3 → 4 says a carrier was added; ⛔ any reading below 3 would mean one was removed, and that is the outcome this seat would treat as a defect regardless of what else the pull request achieved. Control: the workflow file itself is present at baseline (1), so leg A's and B's readings are of a file that exists, ⛔ not of a missing path. ⇒ this card closes on the merge ( Generated by Claude Code |
Fixes #8606
Clause-②: no
Base
origin/main4d65991c5— tip committed 2026-09-10T15:31:10+00:00.Head
ded73e00d— committed 2026-09-10T16:03:55+00:00.1. Both numbers, re-measured on a fresh tree
4d65991c5grep, quoted below.github/workflows/actually holdsgit ls-treeand an on-diskreaddiragree; a nonsense directory returns 0, so 36 is a readingStale by 12, not the 11 the card measured on 2026-09-08 and not the 11 triage re-measured on 2026-09-10T13:4xZ — the directory grew again between triage and this dispatch. That drift, inside two days, is the whole argument against writing the number back by hand.
The two numbers are the same measurement written twice:
scripts/check-pre-install-import-graph.mjsderives the population (WORKFLOW_DIR = '.github/workflows',readWorkflows,readdirSync), and only one of the two copies was live.2. The header, before and after
Before (lines 24-27):
After:
⭐ Not a hand-correction to 36. The repository has converged on "point at the instrument, never copy its answer" three times independently, and this family has already spent two hand-corrections elsewhere (objectui#7837, objectui#7978) making exactly that point. The adjacent hand-count of
scripts/gates goes the same way: the header said "a dozen", the gate's own--listsays 26 distinct scripts across 28 pre-install steps in 22 jobs — the same defect in the same sentence, one word later.3. The unit, and why this one
The new pin reads the header as comment prose with the
#marker stripped, then joined — never as raw lines.Evidence, in the order it decided the question:
\s+in the family pattern spans a line break. Under the carriers' own unit a wrapped sentence is readable; under a per-line unit it is not. Two of the three counts that card names were missed for that reason alone.over 24ended line 24 andworkflow filesopened line 25 behind a#.origin/main:The two only the stripping extraction sees are
pre-install-import-graph.yml(24 workflow files) andshell-escape-residue.yml(200 markdown documents— approximate by construction, ⛔ untouched here, ⛔ not claimed stale). In-class control, same run, same instrument: a count wrapping a comment line reads[]kept and["184 pages"]stripped ⇒ the[]s above are readings, not silences.#sitting in the middle of it…"). Choosing the stripping unit is following the family, not inventing a rule for it.Both legs of the unit are now pinned as a test rather than left as prose, so it cannot drift back: the marker-keeping extraction is kept only as a control and is asserted to read
[]on the wrapped fixture while the stripping one reads["24 workflow files"]. "Clean" can never again mean "unreadable".4. The pin — the fourth carrier of objectui#7448's family
Added to
scripts/__tests__/check-pre-install-import-graph.test.ts, the test file that already owns this workflow. Four assertions:MIN_HEADER_PROSEfloor of 400 characters so an empty scan is a reading rather than a silence.WORKFLOW_DIR, never spelled in the test, and the pointer is asserted to resolve to a directory that actually holds workflows.objectui#6135,node-version: 22,timeout-minutes: 10,actions/checkout@v7, a 60-minute queue timeout).⛔ Nothing existing was weakened. No pin edited, no threshold lowered, no check deleted, no scan surface narrowed. The diff is two files, both additive in effect.
5. Ablation — the pin can fail, proven on disk and restored
Both legs mutate the committed tree, prove the bytes actually changed, run the pin, restore against
HEAD, and prove the restore.HEADblob for the workflow:16c81e79b5e3ba1a8e7eb1bbf31363c4cbf7c997.Leg A — write the pre-fix count back into the header.
Leg B — remove the pointer, so the header stops naming its measurement point.
Both scripts carried
trap restore EXIT INT TERMwith absolute paths, restored withgit checkout HEAD -- PATH(never the bare form, which takes the polluted index), and treated an empty hash as failure rather than as nothing to compare.6. The three existing carriers did not move
POPULATION_COUNTlives in exactly three files underscripts/__tests__/—check-doc-component-types.test.ts,check-doc-fence-languages.test.ts,check-links-workflow.test.ts(git grep -l, exit 0, three hits; nonsense controlZZQQNOTATOKENexits 1, so the three is a reading).Run on the pre-change bytes and on the post-change bytes, same command, same tree:
4d65991c5, byte-identical, hashes verified)ded73e00d)7. Every check, exit code captured before any pipe
pnpm exec vitest run scripts/__tests__/check-pre-install-import-graph.test.tspnpm exec vitest run scripts/__tests__/VERDICT command-exit 0 · held the lock 4s · waited 0s— 4 files, 134 testspnpm type-check:scripts--listFilesconfirms the edited test file is in the program (count 1), so this is a measurement, not an assumptionpnpm lint:rootnode scripts/check-pre-install-import-graph.mjs --self-testnode scripts/check-pre-install-import-graph.mjsnode scripts/check-control-bytes.mjsnode scripts/check-changeset-presence.mjsEvery exit code was captured with a redirect before any pipe (
cmd greater-than file 2 greater-than ampersand 1; EXIT=dollar-question), never throughcmd | tail, and a control-character self-scan over both changed files returned no hits.Fences respected
⛔
content/docs/guide/ci-cd-pipeline.mduntouched, and objectui#8629's counts are not addressed here — that card remains open. ⛔content/docs/releases/**untouched. ⛔scripts/__tests__/dist-pins-guard-message-8274.test.tsand the twonetwork-escape-worker-coverage-8537.escape-*.test.tsfiles untouched (the sibling dev's set stays disjoint). ⛔ No existing pin, threshold, check or scan surface weakened — had the wrapped case required relaxing something that exists, this would have stopped and reported instead.Diff: 2 files, +233 / -5. Draft on purpose — the PM runs the landing pipeline; this seat does not flip it ready, arm auto-merge or merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Generated by Claude Code