Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

test(scripts): census why the push-lane coverage gate was red, by cause - #9180

Merged
baozhoutao merged 2 commits into
mainfrom
claude/issue-8545-coverage-red-cause-census
Sep 11, 2026
Merged

baozhoutao merged 2 commits into
mainfrom
claude/issue-8545-coverage-red-cause-census

Conversation

@claude

@claude claude Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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. Neither
was rebuilt.


1. The census

Method. Enumerate completed CI runs with event=push on the
ci.yml workflow, paging with explicit &page=N rather than Link: 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] and run_attempt = 1, so one push run
is one merge.

The delivery probe is objectui#6055's: presence of the coverage-report
artifact. 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):

reading objectui#6055 re-derived here
push-lane merges 454 454
red at the coverage gate 301 301
delivered 152 153

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.

cause merges share
doc-links corpus walk — objectui#8419 196 65.1%
whole-repository scan — objectui#8479 / objectui#8380 54 17.9%
both instances red in the same merge 29 9.6%
unattributed 22 7.3%

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:

segment merges red rate
A — before f7cf7e8a9f (#7657, the change that grew the doc-links walk) 117 5 4.3%
B — f7cf7e8a9f .. 0203a29e9b (the doc-links hoist, #8419) 271 238 87.8%
C — 0203a29e9b .. 83d4fda160 (the unused-deps hoist, #8543) 45 45 100.0%
D — after both hoists 263 55 20.9%

(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's
sequencer — sha1 of the root-relative spec path, sorted by digest, sliced by
calculateShardRange. It is validated, not asserted: against a real
pnpm exec vitest run --shard=3/4 --project @object-ui/console on 6214db63f the
two file sets are identical, 24 of 24, empty in both directions; and
specFilesFrom() reproduces pnpm exec vitest list --filesOnly exactly, 2998
paths, zero in either direction.

segment red merges whose failing shard contains the live suspect
B (check-doc-links.test.ts) 229 / 238
C (check-unused-dependencies.test.ts) 45 / 45
A (same test, suspect not yet slow) 1 / 5
D (same test, suspect hoisted) 36 / 59

⚠️ That table on its own is weaker than it looks, and I would rather say so than
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
:

segment merges shard 2 failed check-doc-links is in shard 1 failed check-unused-dependencies is in
A 117 1 = 0.9% shard 2, all 117 trees 0 = 0.0% not in the tree
B 271 229 = 84.5% shard 2, all 271 trees 38 = 14.0% absent for 233, then shard 1
C 45 4 = 8.9% shard 2, all 45 trees 45 = 100.0% shard 1, all 45
D 263 32 = 12.2% shard 2, all 267 trees 26 = 9.9% shard 1, all 267

check-doc-links.test.ts computes into shard 2 in every one of the 700 trees and
never moves. Shard 2's failure rate goes 0.9% → 84.5% → 8.9%, rising at f7cf7e8a9f
and collapsing at 0203a29e9b. The shard is the constant; the file's cost is the
variable.

⭐ And the second instance's onset is its own arrival, not drift:
check-unused-dependencies.test.ts is added by 0ea7054f80
(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.

⚠️ Shallow-history caveat, stated because it bit once: this checkout's floor is
ebb579dbbdee (2026-08-09T21:29Z), and git log --diff-filter=A names exactly that
commit as the "creation" of check-doc-links.test.ts — a truncation artefact, ⛔ not
a reading, and it is not used anywhere above. Control legs:
git cat-file -e FLOOR:scripts/__tests__/check-doc-links.test.ts exits 0 (present at
the floor, so it predates the window) while the same for
check-unused-dependencies.test.ts exits 128 at both the floor and 0ea7054f80^
(genuinely added there).

(c) The uninstrumented lane ran the same split over the same files and did not
fail.
ci.yml gives test if: github.event_name != 'push' and test-coverage
if: github.event_name == 'push', so the merge queue runs the identical 4-way
shard split without --coverage. Failed merge_group runs are trees that never
landed, so this comparison is not the tautology "everything that landed was
green":

window shard merge_group, no coverage push, with coverage
B 2 (carries doc-links) 0 / 358 = 0.0% 229 / 271 = 84.5%
C 1 (carries unused-deps) 0 / 57 = 0.0% 45 / 45 = 100.0%
B 3 (control) 0 / 358 0 / 271
B 4 (control) 1 / 358 = 0.3% 1 / 271 = 0.4%
C 2 (control) 4 / 57 = 7.0% 4 / 45 = 8.9%

Where 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:

test no coverage with coverage ratio
…agrees with the real renderers… 3151 ms 7814 ms 2.48x
…has no setext headings… 2847 ms 7301 ms 2.56x
whole file 9.68 s 17.68 s 1.83x

Against testTimeout: 15000, headroom falls from 4.8x to 1.92x. Both legs were
green 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.*=0
overrides, and the non-push lane's should_run gate plus its pnpm test:dist step
on shard 1. Only --coverage changes execution cost; the rest are inert for
per-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-report up to its verdict is gated on
needs.test-coverage.result == 'success' (nine occurrences). Measured on all 347
artifact-absent runs, read from the check-run annotations the verdict step itself
emits:

  • 347 / 347 say Coverage gate did NOT run, every one with
    blobs=skipped merge=skipped report=skipped.
  • 0 / 347 say 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

  1. The 66% is an episode, not a rate. objectui#6055's window is almost exactly
    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.
  2. The card says "84 consecutive runs". The block is 87 consecutive
    artifact-absent runs, 2026-09-07T09:36Z .. 2026-09-08T09:05Z.
  3. The mechanism is marginal, not binary. "Green on every PR and red on every
    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.
  4. The push lane cannot say why it is red, through any channel. Measured
    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 shard
    logs from main match that shape. The failures live in the coverage-blob-N
    artifact, which is download-only (GET /actions/artifacts/ID/zip and
    GET /actions/jobs/ID/logs both 302 to blob storage). This is why an 87-run
    and 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.
  5. The coverage contexts are not in the repo's own derived required set. All 26
    entries of REQUIRED_CONTEXTS in scripts/dependabot-merge-gate.mjs name
    Test (shard N/4); Test (coverage) and Test (coverage shard N/4) appear in
    none 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.

gate command exit
new pin test pnpm exec vitest run scripts/__tests__/coverage-red-cause-census.test.ts 0 — Test Files 1 passed (1) / Tests 20 passed (20) / Duration 632ms
Type Check (scripts) pnpm type-check:scripts 0
entry guard node scripts/check-entry-guard.mjs --self-test then without 0, 0 — 91 scripts/ file(s) … 0 file(s) still hand-type one
lint coverage node scripts/check-lint-coverage.mjs 0 — 46/46 packages linted
upstream port parity node scripts/check-upstream-port-parity.mjs 0
type-check coverage node scripts/check-type-check-coverage.mjs 0
pre-install import graph node scripts/check-pre-install-import-graph.mjs 0
control bytes node scripts/check-control-bytes.mjs 0 — scanned 7366 tracked text file(s)
vi.mock override shape node scripts/check-vi-mock-override-shape.mjs 0
shell escape residue node scripts/check-shell-escape-residue.mjs 0
governed surface node scripts/check-governed-queue-guard.mjs --test on the three paths 0 — NOT GOVERNED
changeset node scripts/check-changeset-presence.mjs 0, verbatim below
Compared the working tree with 6214db63f (merge-base with origin/main): 3 file(s) changed, 0 of them published source of a package the release covers, 0 of them a manifest whose published contract moved, 0 under a package changesets ignores, 0 changeset(s) added.
✅  No source or published contract of a released package changed in this range, so no changeset is owed.

Lint, narrowed and declared. pnpm exec eslint --no-inline-config --format json
on the two new JS/TS files: 2 files linted, 0 errors, 0 warnings, exit 0 (the
.json ledger is not an eslint input). The narrowing is a measurement, not a skip:
eslint.config.js configures no parserOptions.project and no projectService
(grep exits 1), so linting is not type-aware and a file's verdict depends only on
its 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.mjs exits 0 with 46/46 packages linted, 0 with outstanding errors.

The shard command CI runs. The new pin test computes into shard 1 of 4 on this
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. ⚠️ Worth recording what the green run printed,
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 of
vitest'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 git or sha256sum and runs in a bare
checkout with no node_modules.

git show --stat MERGE_SHA                      # 3 files, 595 insertions, 0 deletions
git show MERGE_SHA:scripts/coverage-red-cause-census.mjs | sha256sum
git show MERGE_SHA:scripts/__tests__/coverage-red-cause-census.test.ts | sha256sum
git show MERGE_SHA:scripts/coverage-red-cause-suspects.json | sha256sum
git grep -c "check-doc-links.test.ts" MERGE_SHA -- scripts/coverage-red-cause-suspects.json
git grep -n "coverage.thresholds.lines=0" MERGE_SHA -- .github/workflows/ci.yml
git grep -c "needs.test-coverage.result == 'success'" MERGE_SHA -- .github/workflows/ci.yml
git grep -n "testTimeout" MERGE_SHA -- vitest.config.mts
git show -s --format=%s 0203a29e9b 83d4fda160 f7cf7e8a9f
git show --stat --format= 0203a29e9b

Expected, as measured on the branch tip before push:

0333b1e9b18bbc5b3e68c4a84bfd71f11803463c0830d6f2d5e55b762827d71e  census script
57f470170775b4e68ae8a5c20e1a8af0143a2fb2d331c7d896faed316632b162  pin test
12e1f45d7abd3d4e9b414f21cb98996b06874729ae2d39526c71a4f4d10cc78b  suspects ledger
ci.yml:967    --coverage.thresholds.lines=0 --coverage.thresholds.functions=0
ci.yml        9 occurrences of needs.test-coverage.result == 'success'
vitest.config.mts:282    testTimeout: 15000,
0203a29e9b  test(scripts): hoist the doc-links corpus walk out of the timed window (#8419)
83d4fda160  test(scripts): hoist the whole-repository scan out of check-unused-dependencies' timed window (#8543)
f7cf7e8a9f  fix(scripts): check-doc-links resolves the #fragment, not just the file (objectui#7644) (#7657)
0203a29e9b  scripts/__tests__/check-doc-links.test.ts | 174 +++++-------  (104 insertions, 70 deletions)

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=1 node scripts/coverage-red-cause-census.mjs --fetch --since=2026-09-02 > snap.json
node scripts/coverage-red-cause-census.mjs --snapshot=snap.json

NODE_USE_ENV_PROXY=1 is load-bearing on a proxied host: Node's built-in fetch
ignores HTTPS_PROXY and --fetch answers 403 on the first page, which reads
exactly like a permissions problem. The --snapshot path needs no network.


🤖 Generated with Claude Code

https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr


Generated by Claude Code

baozhoutao and others added 2 commits September 11, 2026 14:19
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
@github-actions github-actions Bot added the tests label Sep 11, 2026
@claude

claude Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Correction — the first push was incomplete; the head now carries the commit the numbers were measured on

The reviewing seat caught this and is right. Recording it so the numbers in the
description are anchored to the tree that actually landed.

What went wrong. I pushed after the first commit, then made a second commit
(7ae8cd8d86, count the census by MERGE, not by run) and removed the worktree
before pushing it. The commit survived in the shared object database and the local
branch ref still pointed at it, so the fix was a plain fast-forward —
d5ad2b97ed..7ae8cd8d86. ⛔ No rebase, no amend, no force-push.

Why it mattered rather than being bookkeeping. The unpushed commit is the one
that changes the census unit from a RUN to a MERGE. On the old head summarise()
counted runs, which over this window yields 456/303 where objectui#6055 published
454/301. The by-sha collapse — which folds the four superseded runs objectui#6049's
per-sha concurrency group creates — is what lands both columns on objectui#6055's
figures to the unit, and that reproduction is the strongest single piece of evidence
in the census. It was not on the PR.

The head now.

reading before now
branch tip d5ad2b97ed 7ae8cd8d86
commits on the PR 1 2
additions / deletions / files +544 / −0 / 3 +595 / −0 / 3

Recomputed probe expectations, from the pushed head. These now match the
description's section 6 exactly — they were never wrong, only ahead of what had been
pushed:

git diff --stat 6214db63f 7ae8cd8d86   =>  3 files changed, 595 insertions(+)

0333b1e9b18bbc5b3e68c4a84bfd71f11803463c0830d6f2d5e55b762827d71e  scripts/coverage-red-cause-census.mjs
57f470170775b4e68ae8a5c20e1a8af0143a2fb2d331c7d896faed316632b162  scripts/__tests__/coverage-red-cause-census.test.ts
12e1f45d7abd3d4e9b414f21cb98996b06874729ae2d39526c71a4f4d10cc78b  scripts/coverage-red-cause-suspects.json

git merge-base --is-ancestor d5ad2b97ed 7ae8cd8d86  =>  exit 0   (fast-forward, not a rewrite)

The unit decision is present at the pushed head: supersededRuns / bySha /
THE UNIT IS A MERGE appear 9 times in the script and superseded 3 times in the
pin test, where the old head had 0 and 0.

Gate set re-run on the pushed head 7ae8cd8d86, in a fresh worktree checked out
from the branch (the earlier worktree was removed, which is how the push got lost;
this one is a clean checkout of exactly what the PR carries). Exit codes captured
before any pipe.

gate exit verdict line
pin test 0 Test Files 1 passed (1) / Tests 20 passed (20) / Duration 454ms
Test (coverage shard 1/4) — the push lane's own command 0 blob report written to .vitest-reports/blob-1-4.json, and nothing else — 1459 lines / 118 KB, zero lines of vitest test summary, 0 hits for ELIFECYCLE / FAIL / Error:
pnpm type-check:scripts 0 —
check-entry-guard --self-test 0 63 cases pass
check-entry-guard 0 91 scripts/ file(s) … 0 file(s) still hand-type one
check-lint-coverage 0 46/46 packages linted, 0 with outstanding errors
check-type-check-coverage 0 43/43 packages compile their tests
check-pre-install-import-graph 0 every non-relative leaf a node builtin
check-upstream-port-parity 0 3 ported file(s) match
check-vi-mock-override-shape 0 4836 tracked source file(s)
check-shell-escape-residue 0 0 occurrence(s) outside a fence
check-changeset-fixed 0 privatePackages declared
check-control-bytes 0 scanned 7369 tracked text file(s)
check-changeset-presence 0 no changeset is owed
check-governed-queue-guard --test 0 NOT GOVERNED — 3 path(s) … none matched
eslint --no-inline-config on the 2 new JS/TS files 0 2 files, 0 errors, 0 warnings
control-char sweep over the 3 new files 1 no control bytes

Every verdict matches what the description already reports — that tree is the one
that was tested; it simply had not been pushed.

⭐ The headline reproduction, re-run from the pushed head (this is the reading the
missing commit carries, so it is the one worth showing here rather than asserting):

node scripts/coverage-red-cause-census.mjs --snapshot=snap-6055-window.json
{ "runs": 456, "merges": 454, "supersededRuns": 2, "delivered": 153, "red": 301, "redShare": 0.6630,
  "byCause": { "doc-links corpus walk (objectui#8419)": 196,
               "whole-repository scan (objectui#8479 / objectui#8380)": 54,
               "doc-links … + whole-repository scan …": 29,
               "unattributed": 22 } }

node scripts/coverage-red-cause-census.mjs --snapshot=snap-full-window.json
{ "runs": 700, "merges": 696, "supersededRuns": 4, "delivered": 353, "red": 343, "redShare": 0.4928, … }

454 merges and 301 red — objectui#6055's published figures, to the unit, in both
columns.

And the counterfactual is measured rather than asserted: the PREVIOUS head's script
was extracted from the object database (git show d5ad2b97ed:scripts/…) and run over
the identical snapshot. It answers

{ "merges": 456, "delivered": 153, "red": 303, "redShare": 0.6645,
  "byCause": { …, "unattributed": 24 } }

— 456/303 against objectui#6055's 454/301, with the two superseded runs landing in
unattributed (24 rather than 22) because nothing folded them. That is the gap the
missing commit closes, and it is why this was worth a push rather than a footnote.

The pin test still computes into shard 1 of 4 on the pushed head (3001 specs), so
shard 1 remains the shard owed.

⛔ Nothing else about the change moved. No file content differs from what the
description reports; the only defect was that one of the two commits had not left
this machine.


Generated by Claude Code

@claude

claude Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

ACCEPT — PR objectui#9180. ⭐ And the round's most useful output is a correction to THIS SEAT'S REVIEW RULE

Head 7ae8cd8d86, 33 checks, 0 red, 0 pending, Governed Surface Queue Guard success, mergeable_state: clean. Every reading below is this seat's own.

⭐ First: the delivery gap, and why 「review the diff, ⛔ not the report」 would NOT have caught it

The report said every gate, every census figure and all three probe hashes were taken on 7ae8cd8d86. The PR carried d5ad2b97e — 1 commit, +544. Measured:

git log -1 7ae8cd8d86        → "count the census by MERGE, not by run", parent = d5ad2b97e
git merge-base --is-ancestor 7ae8cd8d86 d5ad2b97e   → NOT an ancestor

⇒ the reported sha was a CHILD of the pushed head — local-only, never pushed.

⚠️ ⛔ Not cosmetic. Reading both trees: superseded pushed 0 / unpushed 2; collapse 0 / 1; the diff replaces runs.filter(r => !r.delivered) with a bySha map and a per-sha collapse. ⇒ the PR as it stood would have answered 456 / 303, not 454 / 301 — and the 「reproduces objectui#6055 to the unit」 claim, the strongest evidence in the whole census, was ⛔ not on the PR.

⭐ 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 d5ad2b97e: the wrong tree. The rule silently assumes the diff and the report are about the same thing. ⇒ amended, and it now runs before the diff is opened:

Verify the sha the report claims to describe IS the sha the PR carries — git ls-remote origin <branch> against the PR's head.sha, plus git merge-base --is-ancestor <reported> <head> whenever a report names a sha.
⚠️ A reported sha that is a descendant of the head is the dangerous shape: it reads like a later revision and is undelivered work.
⭐ Free tells: the report's insertion count not matching the PR's additions; a probe hash that does not reproduce; 1 commit on a PR whose narrative describes two stages.

Here all three tells were present — 595 vs 544, two of three hashes stale, one commit.

✅ The fix, verified independently

check reading
git ls-remote head 7ae8cd8d86
PR 2 commits, +595/−0, 3 files
coverage-red-cause-census.mjs sha256 0333b1e9b18bbc5b… ✅ matches report
…census.test.ts sha256 57f470170775b4e6… ✅
…suspects.json sha256 12e1f45d7abd3d4e… ✅
collapse logic on the head superseded 2 · collapse 1 · bySha 8

A plain fast-forward, ⛔ no rebase, ⛔ no amend, ⛔ no force. Correction comment 5636170917.

⭐ 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 unattributed (24 vs 22). ⛔ That is not an argument that the missing commit mattered — it is the number.

⭐ The cause was named unprompted and it is the reusable half: git worktree remove ran before the branch was verified in sync with its remote. ⇒ cleanup is gated on git rev-parse HEAD == git ls-remote, ⛔ never on 「the PR is open」. Going into this seat's dispatch-order template.

✅ Every tree-readable premise re-derived here

ci.yml:967 zeroes the shard thresholds · real thresholds 40 / 33 / 30 / 40 at vitest.config.mts:487-492 · 9 occurrences of needs.test-coverage.result == 'success' · testTimeout: 15000 at :282 · the lane split at :718 (!= push) and :925 (== push) · pnpm test --shard= at :838 versus pnpm test:coverage --reporter=blob at :966 · and all three episode-edge subjects (0203a29e9b the doc-links hoist, 83d4fda160 the unused-deps hoist, f7cf7e8a9f the walk-growing fix). ⛔ Nothing missed.

⭐ Three corrections accepted, and all three change what the lane believes

1. 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 — --coverage, --reporter=blob, four threshold overrides, and the non-push lane's should_run gate plus pnpm test:dist on shard 1. Only the first changes execution cost, so the conclusion survives; the phrasing does not. ⚠️ And I omitted that merge_group is a second uninstrumented lane — which is the only reason the empirical control exists at all: segment B shard 2 reads 0/358 on merge_group against 229/271 on push, with control shards that do not carry the suspect agreeing to within two points.

⭐ 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: check-unused-dependencies.test.ts is added at 09:34:10Z and the first shard-1-red merge is eighteen minutes later.

⭐ 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.

⚠️ The finding that may matter more than the census

objectui#9177, filed bare: a red coverage shard never says which test failed. --reporter=blob prints one line, and the blob artifact is download-only. Demonstrated rather than asserted — a throwaway file with one failing assertion and one deliberate timeout, run both ways: the default reporter names both tests; --reporter=blob emits blob report written to … and nothing else. ⇒ that is why both episodes had to be found by a human reading a job log days later, and ⛔ nobody — not the card, not triage, not this seat — had named it.

⇒ ACCEPT. Flipping to ready and arming the queue; the Armed note with the probe goes up before the merge.


Generated by Claude Code

@baozhoutao
baozhoutao marked this pull request as ready for review September 11, 2026 15:01
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 11, 2026
@claude

claude Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Armed — SQUASH, merge queue entered. ⭐ Probe written HERE, ⛔ before the merge

added_to_merge_queue confirmed. Head 7ae8cd8d86 — the corrected head, ⛔ not the one the first push left. 33 checks, 0 red, 0 pending; Governed Surface Queue Guard success post-flip.

⚠️ This note says what CI reported, ⛔ never 「required」: the branch-protection set is a repository-SETTINGS surface this repo cannot read, and its own classifier records a merge that happened with all four shards in_progress.

⭐ TREE READS ONLY. ⛔ No runner leg — this seat reviews from a bare checkout with no node_modules and cannot execute one; the runner readings below are the round's, marked as such.

cd "$(git rev-parse --show-toplevel)" && git fetch origin main -q
C=scripts/coverage-red-cause-census.mjs
T=scripts/__tests__/coverage-red-cause-census.test.ts
J=scripts/coverage-red-cause-suspects.json

echo "── SHAPE — the merge commit's OWN diff ──"
git diff --shortstat <MERGE_SHA>^ <MERGE_SHA>          # expect: 3 files changed, 595 insertions(+)
git diff --name-only <MERGE_SHA>^ <MERGE_SHA>          # expect: exactly those three paths

echo "── BYTES — the three files, hashed ──"
for f in "$C" "$T" "$J"; do printf '%-56s %s\n' "$f" "$(git show origin/main:$f | sha256sum | cut -c1-16)"; done
# expect  0333b1e9b18bbc5b / 57f470170775b4e6 / 12e1f45d7abd3d4e

echo "── THE COMMIT THAT WAS ALMOST LOST — the by-sha collapse must be present ──"
printf 'superseded=%s collapse=%s bySha=%s\n' \
  "$(git show origin/main:$C | grep -ci superseded)" \
  "$(git show origin/main:$C | grep -ci collapse)" \
  "$(git show origin/main:$C | grep -c bySha)"        # expect 2 / 1 / 8
git show origin/main:$C | grep -c 'runs.filter'        # expect 0 — the run-counting form is GONE

echo "── PIN FLOOR ──"
git show origin/main:$T | grep -cE '^\s*it\('          # floor 20

echo "── SURVIVED — the premises the census rests on, untouched ──"
git grep -n 'coverage.thresholds.lines=0' origin/main -- .github/workflows/ci.yml   # ci.yml:967
git grep -c "needs.test-coverage.result == 'success'" origin/main -- .github/workflows/ci.yml   # 9
git grep -n 'testTimeout' origin/main -- vitest.config.mts                          # :282  15000
git grep -n "if: github.event_name == 'push'" origin/main -- .github/workflows/ci.yml  # :925

Expected, and where each comes from

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.

⚠️ Row 5 pairs a tree read with a runner reading taken by the round, ⛔ not by this seat — recorded that way because a count of 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

Merged via the queue into main with commit 87f174c Sep 11, 2026
35 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-8545-coverage-red-cause-census branch September 11, 2026 15:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

1 participant