Repository navigation
test(ci): widen the live-reading lock to what required jobs RUN, not just the workflows - #9696
Conversation
…just the workflows The `is the only place the LIVE reading runs` assertion measured its population over the workflow files alone. Its own comment stated the intent as "if a required job ever grows a `pnpm dedupe` of its own" — but the way a required job actually grew one, the time it happened, was through a TEST FILE, which is not a workflow. So the lock named after objectui#9562 could not have seen objectui#9562 arrive: another test file spawning the checker, or running `pnpm dedupe` itself, was green with nothing red. One assertion, one widened population — the workflows plus every tracked test file and the vitest runtime modules they load — rather than a second lock per class of file, which would only move the blind spot to the next class. Source comments are blanked through `scripts/js-comment-mask.mjs` so prose about the hazard cannot count as the hazard; workflow comment lines are stripped as before. The exemptions are two and each is checkable: the path-filtered workflow, and this file, whose every run asserts the `pnpm` stub served it. A companion control drives the detector over each re-introduction route and over prose spelling the same commands, so a marker that stopped matching reds instead of reporting an empty tree as clean. The scan's remaining blind spots are stated in the file header rather than left to read as coverage. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015h79niBMyoB1xcaQje3uiz
ACCEPT — in-seat review,
|
| check | result |
|---|---|
| Commit message | ✅ no model identifier; Co-authored-by: Claude <noreply@anthropic.com> + Claude-Session:; ⛔ no card trailer on the commit |
| Commit author | ✅ claude — ⛔ not a user account |
Body line 0 / Clause-② |
✅ Fixes #9693 / Clause-②: no at line start |
| File surface | ✅ one file, +189/−7; .github/**, the checker and the lockfile all untouched |
| New CI context | ✅ none ⇒ ⛔ does not touch the PR #9584 chokepoint |
| Triage's boundary | ✅ one assertion, population widened — ⛔ not a second lock per class of file |
| Governed? | ✅ NOT GOVERNED |
⭐ Three things here are better than what I asked for
- The mask is the right instrument, not a filter you invented. Blanking source comments through
scripts/js-comment-mask.mjs— the tree's own answer to "comment, or code?" — means prose about the hazard cannot count as the hazard. ⭐ That is this lane's 「a count-based probe lies; split by carrier」 lesson implemented inside the gate, which is a better home for it than a patrol note. - Floors under both reads (
scan.workflows > 20,scan.population.length > FLOORS.testFiles). ⇒ a collapsed read reds instead of reporting an empty tree as clean. ⛔ An empty result is not a reading, and now the gate knows that about itself. - The companion control is the strongest thing in the diff. Each positive leg is the spelling itself rather than a description of one, and the negative legs cover both comment forms and
const dedupe = new Set<string>()— an ordinary identifier that would otherwise be a standing false positive in a UI repo. Its own comment names the failure it prevents: "a marker that stopped matching fails here instead of reporting an empty tree as clean."
⭐ And deriving THIS_FILE from import.meta.url means a rename cannot silently drop the exemption. Small, and exactly the right instinct.
⚠️ What you stated as NOT covered, recorded so nobody reads it as coverage
A non-test script that a required job runs and which shells out to pnpm dedupe itself is still outside the population, because the tree's own classification strings quote that command in prose that no mask blanks — so that population needs a way to tell a command from a citation first. ⛔ You did not file it, and that is right: no such invocation exists in the tree (measured — the only argv-form call is the checker's own), so there is nothing to fix yet. Stating it in the file header is the correct carrier.
⭐ Your other two out-of-scope notes name their carriers correctly too: the header's Test (shard N/4) prose belongs to PR #9584 (which already holds ci.yml, and ⛔ re-wording it from this branch would collide), and the recipe caveat belongs to this PR body.
Release
Flipping to ready, re-waiting for the checks the flip itself registers (measured: ready_for_review has registered a check that did not exist a second earlier on nine occasions, two of them not this seat's), re-reading green, then arming the queue. ⛔ No hand-merge for behind — the queue rebases onto main itself.
Generated by Claude Code
Fixes #9693
Clause-②: no — widening a lock's population makes it catch MORE, which tightens an acceptance set rather than relaxing one, and publishes nothing. The diff is one test file; no published source, no manifest field, no shipped byte moves (
check-changeset-presenceagrees below).What was wrong
scripts/__tests__/check-lockfile-dedupe.test.tspinned the live, registry-dependentpnpm dedupe --checkto one path-filtered workflow — by scanningworkflowsand nothing else. Its own comment states the intent as "if a required job ever grows apnpm dedupeof its own, objectui#9562 comes straight back", but the way a required job actually grew one, the time it happened, was through a test file — and a test file is not inworkflows.⇒ the lock named after objectui#9562 could not have seen objectui#9562 arrive.
Measured before changing anything — the card's re-check, and where it differs
Run verbatim (probe added to
scripts/__tests__/, spawning the shipped checker unstubbed, no timeout argument),vitest run --project unit scripts/__tests__/came back exit 1 · 170 passed, 1 failed — and the one red was the probe's ownError: Test timed out in 15000ms, ⛔ not the lock. The live reading measures ~25-32s in this container (node scripts/check-lockfile-dedupe.mjsalone:real 0m32.036s,VERDICT deduped), over vitest's 15s default. So the card's "expect: passes" is not reproducible verbatim here — the incidental red is a clock, not a guard.Raising the timeout is exactly what an author meeting that red does. With
120_000on the probe and nothing else changed, on29a8a9526:⇒ a live registry reading, taken from inside the
unitproject — whichci.ymlshards into REQUIRED contexts — with every assertion in the lock file green. Row 3 of the card reproduces.The change
One assertion, one widened population — ⛔ not a second lock per class of file, which would only move the blind spot to the next class:
vitest.config/vitest.setupmodules loaded around them, with comments blanked throughscripts/js-comment-mask.mjs— the tree's one answer to "comment, or code?". This matters both ways: the file's own header names both hazardous spellings, so without the mask the assertion could never be green.The detector is three markers, and deliberately not the bare word
dedupe(this repository spends it on UI dedupe keys in hundreds of files): the checker's path;pnpmanddedupeadjacent in either the shell or the argv spelling; andcheck:lockfile-dedupe, the package script that is a second name for the first.The exemption list is two entries and each is checkable: the path-filtered workflow, and this file, whose every run already asserts the
pnpmstub served it. The file's path is derived fromimport.meta.url, so a rename cannot silently drop either the exemption or the assertion.A companion control drives the detector over each re-introduction route the card enumerates and over prose spelling the same commands, so a marker that stopped matching reds instead of reporting an empty tree as clean. Floors under both reads (workflow count, and the test-file floor
check-test-path-roots.mjsalready publishes — reused rather than re-stated) keep a collapsed population from passing the equality.pnpm dedupeitself (the tree's own classification strings quote that command in prose no mask blanks, so that population needs a way to tell a command from a citation first); an invocation assembled at runtime; and an untracked file, since the walk isgit ls-files— which bites locally, beforegit add, and not in the context the lock protects.Ablation — both new routes, rebuilt and proven on disk each leg
The repair was committed first; each leg restores under a
trap, and the restore is verified bygit diff HEADbeing empty, ⛔ not by an exit code.29a8a9526)scripts/__tests__/probe-9693-live-reading.test.tsspawnSync('pnpm', ['dedupe', '--check']),grep -cfor the checker path = 0The failure prints the offending path next to the two that may be there, under the message
a live, registry-dependent reading inside a REQUIRED context — objectui#9562, again. The probe file was deleted; the working tree is clean.Checks run locally
vitest run --project unit scripts/__tests__/Test Files 170 passed | 2 skipped (172)·Tests 4892 passed· exit 0node scripts/check-changeset-presence.mjs✅ No source or published contract of a released package changed in this range, so no changeset is owed.node scripts/check-test-path-roots.mjs✅ check-test-path-roots: OK (2080 filesystem call(s) in 438 of 3211 test file(s) …)node scripts/check-control-bytes.mjs✅ check-control-bytes: OK (scanned 7801 tracked text file(s); skipped 85 binary)node scripts/check-comment-mask-corpus.mjs1 file(s) disagree, within the residue objectui#7882 is holding open— unchanged by this branch, and the new regex character classes carrying quote characters are the shape that sweep exists to catcheslint scripts/__tests__/check-lockfile-dedupe.test.tsHeavy runs went through the shared verify lock.
scripts/__tests__/is the blast radius: nothing outside it reads this file, and the diff touches no runtime source.Acceptance notes
Testaggregator becomes the required test context, shards 4 -> 8, dist pins get their own job #9584 is untouched. That PR does hold.github/workflows/ci.yml; this branch holds no workflow file, and the new assertion reads no context NAME, so the two do not overlap.Test (shard N/4)jobs. PR ci: oneTestaggregator becomes the required test context, shards 4 -> 8, dist pins get their own job #9584 is the change that would move that description, and it already holds the file that defines them; carrier: that PR. ⛔ Not repaired here: it is pre-existing prose outside this card's boundary, and re-wording it from this branch would collide with it.Generated by Claude Code