Repository navigation
test(scripts): census why the push-lane coverage gate was red, by cause - #9180
Conversation
objectui#6055 measured that 301 of 454 push-lane merges were red at the coverage gate and said plainly that this was a correlation between two measurements: it never classified those failures by cause. This adds the classifier, as a one-off census script plus its pin test. Over 700 push-lane merges (2026-09-02T08:53Z..2026-09-11T13:20Z, every one actor github-merge-queue[bot], run_attempt 1), read by objectui#6055's delivery probe — presence of the `coverage-report` artifact, never a run-level conclusion — 347 are red. 283 of them (81.6%) fall in the live window of one of two whole-corpus-walk instances AND failed the shard that instance computes into on that run's own tree; in objectui#6055's own window the share is 279 of 303 (92.1%). The script is deliberately not a gate and is wired into no workflow. It exists so those numbers stay reproducible from a file. `shardOf()` is a replica of vitest 4.1.10's sequencer, validated against a real `vitest run --shard=3/4 --project @object-ui/console` (24 of 24 files, empty in both directions); `specFilesFrom()` reproduces `vitest list --filesOnly` on 6214db6 exactly (2998 paths, zero either way). The header states the resolution limit rather than papering over it: the push lane runs `--reporter=blob`, which prints no failing-test names, and the `coverage-blob-N` artifact that holds them is download-only. Per-run failing-test identity is not recoverable from CI, so the census classifies by shard identity and lane pairing, and says so. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
objectui#6049's per-sha push concurrency group cancels a superseded run and starts a fresh one on the SAME head sha seconds later. The cancelled one carries no `coverage-report` artifact and so reads as red under the delivery probe, while the commit itself got its merged report moments afterwards. Counting runs therefore over-counts red. Over 2026-09-02..09-11 the gap is 4 runs in 700 — and it is exactly the gap that made this census's first draft report 456/303 where objectui#6055 published 454/301. Collapsed by sha, both land on objectui#6055's figures to the unit, which is the agreement that makes the denominator re-derived rather than merely similar. `summarise` now groups by head sha, treats a merge as delivered when ANY of its runs delivered, and reports `supersededRuns` so the collapse is visible rather than silent. Two pin tests cover the collapse in both directions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Correction — the first push was incomplete; the head now carries the commit the numbers were measured onThe reviewing seat caught this and is right. Recording it so the numbers in the What went wrong. I pushed after the first commit, then made a second commit Why it mattered rather than being bookkeeping. The unpushed commit is the one The head now.
Recomputed probe expectations, from the pushed head. These now match the The unit decision is present at the pushed head: Gate set re-run on the pushed head
Every verdict matches what the description already reports — that tree is the one ⭐ The headline reproduction, re-run from the pushed head (this is the reading the 454 merges and 301 red — objectui#6055's published figures, to the unit, in both And the counterfactual is measured rather than asserted: the PREVIOUS head's script — 456/303 against objectui#6055's 454/301, with the two superseded runs landing in The pin test still computes into shard 1 of 4 on the pushed head (3001 specs), so ⛔ Nothing else about the change moved. No file content differs from what the Generated by Claude Code |
ACCEPT — PR objectui#9180. ⭐ And the round's most useful output is a correction to THIS SEAT'S REVIEW RULEHead ⭐ First: the delivery gap, and why 「review the diff, ⛔ not the report」 would NOT have caught itThe report said every gate, every census figure and all three probe hashes were taken on ⇒ the reported sha was a CHILD of the pushed head — local-only, never pushed.
⭐ This seat's standing rule is 「review against the DIFF, ⛔ never the report」 — and it sends you to the diff. The diff on offer was
Here all three tells were present — 595 vs 544, two of three hashes stale, one commit. ✅ The fix, verified independently
A plain fast-forward, ⛔ no rebase, ⛔ no amend, ⛔ no force. Correction comment ⭐ And the counterfactual was turned into a MEASUREMENT rather than a claim: the previous head's script, extracted from the object database and run over the identical snapshot, answers 456 / 303, with the two superseded runs landing in ⭐ The cause was named unprompted and it is the reusable half: ✅ Every tree-readable premise re-derived here
⭐ Three corrections accepted, and all three change what the lane believes1. The 66 % is an EPISODE, ⛔ not a rate. Red rate by segment, at merge granularity: 4.3 % before the doc-links walk grew → 87.8 % → 100 % → 20.9 % after both hoists. ⇒ 「two thirds of push-lane spend buys a verdict that means nothing」 and 「82 of 125 runner-hours per day」 were true of 2026-09-05..09-09 and are not true now. ⭐ The hypothesis is confirmed at a high share and the standing cost figure is stale — both, ⛔ not one. The residual 20.9 % is still ~5× the pre-episode baseline and is the number any follow-up gets priced on. 2. The mechanism is MARGINAL, ⛔ not binary. The card, triage and my claim all say 「green on every PR and red on every push」. Exact for one segment (45/45) and wrong for the other (238/271 = 87.8 %). At 2.48× / 2.56× instrumented cost the walk sits at the bound, so runner load decides each run. ⇒ a remedy priced on 「deterministic」 would mis-predict 271 of the 316 merges in the episode. 3. ⛔ My 「instrumentation is the only variable」 was wrong. Four things differ between the lanes — ⭐ Why the attribution is a measurement and not an inference⛔ No run was classified 「this mechanism」 because it was red and something was slow. Attribution requires both the suspect's live window and the computed shard, and the discriminating form is cross-segment: the suspect's shard never moves while its failure rate does — shard 2 runs 0.9 % → 84.5 % → 8.9 % → 12.2 %, rising at the walk-growing commit and collapsing at the hoist. ⭐ And the second instance's onset is the file's own arrival: ⭐ The round also said plainly where its own evidence is weak — that the per-run shard test approaches circularity when one shard dominates a segment, and that a third instance in the 20.9 % residual is NOT MEASURED and ⛔ 「not 'no'」, because all eight candidates land on the same marginal rates and the test has no discriminating power there. ⇒ a measurement returning 「cannot tell」, ⛔ not a finding of absence.
|
Armed —
|
| leg | expect | read from |
|---|---|---|
| merge-commit diff | 3 files, 595 insertions | ⭐ scoped to <MERGE_SHA>^ <MERGE_SHA>, ⛔ never a range ending at a moving ref |
census.mjs · census.test.ts · suspects.json |
0333b1e9b18bbc5b · 57f470170775b4e6 · 12e1f45d7abd3d4e |
hashed off the pushed head by this seat |
superseded / collapse / bySha |
2 / 1 / 8 | ⭐ the delivery leg |
runs.filter |
0 | ⭐ the run-counting form the lost commit replaced |
it( call sites in the pin |
floor 20 | and the round's runner says Tests 20 passed (20) ⇒ ⭐ they agree, so no .each is hiding cases |
| the four premise sites | unchanged | the census is only as good as these |
⭐ Rows 3 and 4 are the point of this probe. The first push carried a head that counted runs, and would have answered 456 / 303 instead of 454 / 301 — proved by running that exact script over the same snapshot. ⇒ a leg asking only 「did the files land?」 goes green on the wrong tree. superseded=2 and runs.filter=0 are what distinguish the delivered head from the one that was almost merged.
it( call sites is ⛔ not a test count when .each is present. Here it is, and they agree at 20; that agreement is the control.
Generated by Claude Code
Fixes #8545
This card is a measurement, not a remedy. Nothing here changes a threshold, a
timeout, a shard count, a coverage setting or any existing test file. It adds one
census script, its suspects ledger and its pin test, and reports what they
measured. The script is deliberately wired into no workflow.
The card's original scope (the convention, plus a gate enforcing it) was withdrawn
by triage on 2026-09-10 after R51 measured 91 enumerating call sites in 23 files on
unmodified
main; the written-down convention was refused in the same comment. Neitherwas rebuilt.
1. The census
Method. Enumerate completed
CIruns withevent=pushon theci.ymlworkflow, paging with explicit&page=Nrather thanLink: rel="next"— objectui#6055 measured that cursor walking exhausts early and that is how that
card's own baseline denominator came out about a quarter short. Every run in the
window is
actor = github-merge-queue[bot]andrun_attempt = 1, so one push runis one merge.
The delivery probe is objectui#6055's: presence of the
coverage-reportartifact. Never a run-level conclusion, which objectui#6055 independently
re-confirmed is not a delivery proxy.
The unit is a merge, not a run. objectui#6049's per-sha concurrency group
cancels a superseded run and starts a fresh one on the same head sha seconds
later; the cancelled one carries no artifact and reads as red while the commit
got its merged report moments afterwards. Four such pairs are in the window.
Collapsing by sha is what makes this census agree with objectui#6055 to the unit.
Denominator, objectui#6055's own window (2026-09-05 .. 2026-09-09T17:42Z):
Denominator, the full census window (2026-09-02T08:53Z .. 2026-09-11T13:20Z):
700 runs, 4 superseded, 696 merges, 343 red (49.3%).
Cause split of the 301.
Over the full 696-merge window: 200 / 54 / 29 / 60 unattributed — 283 of 343 =
82.5%.
2. The share that is this card's mechanism — 279 of 301 = 92.7%
⛔ Not inferred from "it was red and something was slow." Four independent
readings, each with its own control:
(a) The red is an episode with two edges, and both edges are hoist commits.
Red rate by segment, at merge granularity:
f7cf7e8a9f(#7657, the change that grew the doc-links walk)f7cf7e8a9f..0203a29e9b(the doc-links hoist, #8419)0203a29e9b..83d4fda160(the unused-deps hoist, #8543)(b) The failing shard is the shard the un-hoisted file computes into, on that
run's own tree.
shardOf()in the new script is a replica of vitest 4.1.10'ssequencer — sha1 of the root-relative spec path, sorted by digest, sliced by
calculateShardRange. It is validated, not asserted: against a realpnpm exec vitest run --shard=3/4 --project @object-ui/consoleon6214db63fthetwo file sets are identical, 24 of 24, empty in both directions; and
specFilesFrom()reproducespnpm exec vitest list --filesOnlyexactly, 2998paths, zero in either direction.
check-doc-links.test.ts)check-unused-dependencies.test.ts)let it be read as stronger. When one shard dominates a segment, "the failing shard
contains the suspect" approaches "that shard failed", which is nearly circular. The
discriminating form is the cross-segment one — the suspect's shard never moves,
and its shard's failure rate does:
check-doc-linksis incheck-unused-dependenciesis incheck-doc-links.test.tscomputes into shard 2 in every one of the 700 trees andnever moves. Shard 2's failure rate goes 0.9% → 84.5% → 8.9%, rising at
f7cf7e8a9fand collapsing at
0203a29e9b. The shard is the constant; the file's cost is thevariable.
⭐ And the second instance's onset is its own arrival, not drift:
check-unused-dependencies.test.tsis added by0ea7054f80(2026-09-07T09:34:10Z, #8304), and the first push-lane merge with shard 1 red is
2026-09-07T09:52:35Z — eighteen minutes later. The tree listings agree
independently: the file is absent from the first 233 trees of segment B.
ebb579dbbdee(2026-08-09T21:29Z), andgit log --diff-filter=Anames exactly thatcommit as the "creation" of
check-doc-links.test.ts— a truncation artefact, ⛔ nota reading, and it is not used anywhere above. Control legs:
git cat-file -e FLOOR:scripts/__tests__/check-doc-links.test.tsexits 0 (present atthe floor, so it predates the window) while the same for
check-unused-dependencies.test.tsexits 128 at both the floor and0ea7054f80^(genuinely added there).
(c) The uninstrumented lane ran the same split over the same files and did not
fail.
ci.ymlgivestestif: github.event_name != 'push'andtest-coverageif: github.event_name == 'push', so the merge queue runs the identical 4-wayshard split without
--coverage. Failedmerge_groupruns are trees that neverlanded, so this comparison is not the tautology "everything that landed was
green":
merge_group, no coverageWhere the suspect is absent the two lanes agree to within two points. Where it is
present they differ by 84 and 100 points.
(d) The instrumented cost, measured on the pre-hoist tree. Checked out
4b4d35a7d5(0203a29e9b^) in a throwaway worktree and ran the file both ways:…agrees with the real renderers……has no setext headings…Against
testTimeout: 15000, headroom falls from 4.8x to 1.92x. Both legs weregreen on this 4-core box — the timeout is load-dependent, which is exactly why
segment B is 87.8% red and not 100%.
Is there a third instance in the 20.9% residual? NOT MEASURED, and ⛔ not "no".
Eight candidate files — the card's own three slowest survivors, the two hoisted ones,
and three more whole-corpus walkers — were scored against segment D's 59 red merges by
the same shard test. Every one of them lands on 30/59 (50.8%) or 36/59 (61.0%), which
are exactly the marginal rates at which shards 1 and 2 failed in that segment: with
only two shards failing and all eight candidates living in one of them, the test has
no discriminating power there. That is a measurement returning "cannot tell", ⛔ not a
finding of absence. Settling it needs the failing-test names, which is objectui#9177.
3. The two premises the PM claim marked "not re-measured"
Premise: same shards, same files, coverage instrumentation the only variable.
Substantially confirmed, with one correction. Reading (c) is the empirical form
and reading (d) the mechanical one. The correction: the two lanes differ in four
ways, not one —
--coverage,--reporter=blob, four--coverage.thresholds.*=0overrides, and the non-push lane's
should_rungate plus itspnpm test:diststepon shard 1. Only
--coveragechanges execution cost; the rest are inert forper-test timing. Also, the lane boundary is push versus pull_request and
merge_group, so the queue build is a second uninstrumented lane, which is what
makes reading (c) available at all.
Premise: thresholds live only on the merged report, so one red shard means the
gate does not run. Confirmed, and now measured rather than quoted. The shard
legs pass
--coverage.thresholds.lines=0 --coverage.thresholds.functions=0 --coverage.thresholds.branches=0 --coverage.thresholds.statements=0(
ci.yml:967-968) against real thresholds of 40/33/30/40 (vitest.config.mts:487),and every step of
coverage-reportup to its verdict is gated onneeds.test-coverage.result == 'success'(nine occurrences). Measured on all 347artifact-absent runs, read from the check-run annotations the verdict step itself
emits:
Coverage gate did NOT run, every one withblobs=skipped merge=skipped report=skipped.Coverage thresholds breached.So across 696 merges the thresholds were evaluated on 353 commits and on 343 they
were never evaluated at all. ⛔ None of the red is a coverage regression.
4. What the card, triage and the PM claim got wrong
the epidemic. The baseline before it is 4.3% and the rate after both hoists is
20.9%. The derived "82 of 125 push-lane runner-hours per day" was true of
2026-09-05 .. 09-09 and is not true now. ⭐ The hypothesis is confirmed at a
high share and the standing cost estimate is stale — both, not one.
artifact-absent runs, 2026-09-07T09:36Z .. 2026-09-08T09:05Z.
push" is exact for segment C (45/45) and wrong for segment B (238/271): at 2.5x
instrumented cost the walk sits at the bound, so runner load decides. Two
regimes, not one.
directly: one throwaway file with one failing assertion and one deliberate
timeout, run both ways on the same tree. Default reporter — exit 1, both test
names,
Error: Test timed out in 50ms.,Tests 2 failed (2).--reporter=blob— exit 1, one line of output:
blob report written to …. Two real red shardlogs from
mainmatch that shape. The failures live in thecoverage-blob-Nartifact, which is download-only (
GET /actions/artifacts/ID/zipandGET /actions/jobs/ID/logsboth 302 to blob storage). This is why an 87-runand an 84-run episode each had to be found by hand — a separate and cheaper
problem than the one the card was filed about. Filed bare as objectui#9177.
entries of
REQUIRED_CONTEXTSinscripts/dependabot-merge-gate.mjsnameTest (shard N/4);Test (coverage)andTest (coverage shard N/4)appear innone of them. Stated as what CI reported, ⛔ never as "required".
5. Gates
Exit codes captured before any pipe; each verdict line is the gate's own.
pnpm exec vitest run scripts/__tests__/coverage-red-cause-census.test.tsTest Files 1 passed (1) / Tests 20 passed (20) / Duration 632mspnpm type-check:scriptsnode scripts/check-entry-guard.mjs --self-testthen without91 scripts/ file(s) … 0 file(s) still hand-type onenode scripts/check-lint-coverage.mjs46/46 packages lintednode scripts/check-upstream-port-parity.mjsnode scripts/check-type-check-coverage.mjsnode scripts/check-pre-install-import-graph.mjsnode scripts/check-control-bytes.mjsscanned 7366 tracked text file(s)node scripts/check-vi-mock-override-shape.mjsnode scripts/check-shell-escape-residue.mjsnode scripts/check-governed-queue-guard.mjs --teston the three pathsNOT GOVERNEDnode scripts/check-changeset-presence.mjsLint, narrowed and declared.
pnpm exec eslint --no-inline-config --format jsonon the two new JS/TS files: 2 files linted, 0 errors, 0 warnings, exit 0 (the
.jsonledger is not an eslint input). The narrowing is a measurement, not a skip:eslint.config.jsconfigures noparserOptions.projectand noprojectService(
grepexits 1), so linting is not type-aware and a file's verdict depends only onits own bytes plus the flat config — three added files cannot move any untouched
file's verdict. The repo's own coverage authority agrees the population is intact:
node scripts/check-lint-coverage.mjsexits 0 with46/46 packages linted, 0 with outstanding errors.The shard command CI runs. The new pin test computes into shard 1 of 4 on this
⚠️ Worth recording what the green run printed,
tree, so shard 1 is the one owed. Run locally, verbatim:
pnpm test:coverage --reporter=blob --shard=1/4 --coverage.thresholds.lines=0 --coverage.thresholds.functions=0 --coverage.thresholds.branches=0 --coverage.thresholds.statements=0— exit 0, about 15 minutes.
because it corroborates objectui#9177 from the other side: 1459 lines / 118 KB, of
which lines 1-115 are stdout the tests themselves emitted, line 115 is
blob report written to …, and 116-1459 are the v8 coverage text table. Zero lines ofvitest's own test summary. And a red shard exits before that table is generated, so
a red log has neither the failure summary nor the coverage table — exactly the shape
of the two real red shard logs sampled from
main.What CI reported: nothing yet. This draft PR is opened at report time, so its
checks are
in_progress. Everything above is a local run of the command CI runs.6. Post-merge probe — tree reads only
No runner leg: every command below is
gitorsha256sumand runs in a barecheckout with no
node_modules.Expected, as measured on the branch tip before push:
Two probe legs are dev-only, ⛔ not run by the PM because they need a runner:
the shard replica validation against a real
vitest run --shard=3/4(24 of 24,empty both ways) and the instrumented-cost table in section 2(d). Their readings
from this seat's run are quoted above.
7. Reproducing the census
NODE_USE_ENV_PROXY=1is load-bearing on a proxied host: Node's built-infetchignores
HTTPS_PROXYand--fetchanswers 403 on the first page, which readsexactly like a permissions problem. The
--snapshotpath needs no network.🤖 Generated with Claude Code
https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Generated by Claude Code