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

Commit 511e402

Browse files
claude[bot]claude
andauthored
ci(coverage): give the instrumented lane its own per-test budget so the coverage gate can run (#9474)
Part of #9271. ⛔ Deliberately NOT `Fixes` — this closes the proximate half only; the structural half named at the bottom stays open on the card. ## What was measured ⭐ **The blind window is 116 consecutive `ci.yml` push runs on `main`** — runs 17230 → 17738, `2026-09-11T23:17:11Z` → `2026-09-14T07:09:07Z`, **2 days 9 h 42 m**. `Test (coverage)` is `failure` in **116 of 116**. Last run whose coverage lane was green: run **17227** (`a94e4d073`, 2026-09-11T21:27:02Z), which also published the only `coverage-report` artifact in the window. ⛔ **objectui#8479's 66-run streak is NOT this streak.** Population: the 500 most recent `branch=main, event=push` runs of workflow 223145786 (runs 15611 → 17738, from 2026-09-07T06:45Z). It holds **221 successes**, the newest being run 17227 — so the 2026-09-07 streak healed and this is a second, later one. ⇒ the card's written re-grade trigger ("longer than roughly a week") **does not fire**; `priority:p2` stands on duration. ## The break in the chain, read rather than inferred ⭐ The blobs are **not missing**. On red run 17738 all four `coverage-blob-N` artifacts exist and are live (7.8–8.7 MB each); the green run 17227 carries the same four **plus** `coverage-report`. `blobs=skipped` in the sentinel is the *counting step* being skipped, not an absent blob. The break is that `coverage-report` gates **every** step on `needs.test-coverage.result == 'success'`. One timed-out row reds a shard, so checkout, download, blob-count and merge are all skipped — and the merge is the only place `coverage.thresholds` is enforced, because the shard legs override all four to `0`. Verbatim from run 17738: ``` shards=failure blobs=skipped merge=skipped report=skipped — no complete merged report was produced for db6aa19, so the coverage thresholds were never evaluated on this commit ``` ## Instrumentation isolated as the single variable The same-commit CI comparison could never settle this: `test-coverage` is `if: github.event_name == 'push'` and `test` is `if: github.event_name != 'push'`, so instrumentation and trigger event are confounded **by construction**. Isolated locally instead — same tree, same container, same command, `--coverage` the only difference: | population: the 146 rows of the two heaviest sweep files, tree `db6aa19a9` | no coverage | coverage | |:--|--:|--:| | rows exceeding the production 15000 ms budget | **0** | **5** | | sum of all row durations | 30.3 s | 115.5 s (**3.81×**) | | heaviest row | 6.6 s | 25.3 s | The five rows that blow the budget under instrumentation are exactly the five CI sites in those files, and the ordering corroborates: the marginal row (15.0 s locally) is the one that fires 11× in CI, while the 24–25 s rows fire 64–94×. ## ⚠️ The rows are NEW, not degraded — the corpus-growth hypothesis is false Same instrumented command, same container, two trees, rows paired **by name**: | population: the 106 `check-i18n-dead-keys` rows present on BOTH trees | `a94e4d073` (last green) | `db6aa19a9` (today) | |:--|--:|--:| | total | 1.4 s | 1.3 s (0.9×) | | rows over 15 s | 0 | 0 | ⇒ the shared rows did not slow down at all. **All three of that file's timeout sites are rows that did not exist at the last green run**, added 2026-09-12; and the single most frequent site overall, `check-object-metadata-write-doors.test.ts`, is an entire file that landed 2026-09-12T04:00Z. The tracked-file corpus grew only 3.2% (7492 → 7733) across the window, nowhere near enough to matter. ## The repair, and what it does not weaken A **lane-scoped** `--testTimeout=60000` on the instrumented shard command — 4× the uninstrumented budget, 2.4× the heaviest row observed under instrumentation. ⛔ Not a per-row bump: the wandering site is exactly why it is applied to the lane. - `vitest.config.mts` keeps `testTimeout: 15000`, so the **uninstrumented lane — the one that actually runs before a merge — is untouched**. `gates_weakened: NONE`. - No job-budget risk: `test-coverage` has `timeout-minutes: 40` against observed shard wall clocks of 698–1053 s. ### Evidence the gate is restored ⭐ A green shard is not evidence a report was produced, so here is the report and the thresholds. CI cannot host this demonstration — the coverage lane runs only on `push` to `[main, develop]`, never on a PR — so it is reproduced locally over the five CI timeout-site files: | leg | shard exit | merge | thresholds | |:--|:--|:--|:--| | `--testTimeout=15000` | **1** (10 timeouts, **0** assertion failures) | never runs — gated on shard success | **never evaluated** | | `--testTimeout=60000` | **0** (379/379 pass) | runs | **evaluated** | The merged report from the passing leg, produced by `ci.yml`'s own merge command: ``` Statements : 75% ( 1924/2565 ) Branches : 75.69% ( 1501/1983 ) Functions : 74.83% ( 232/310 ) Lines : 77% ( 1634/2122 ) ``` ⭐ Firing control that the thresholds are genuinely **enforced** and not merely printed — same blobs, same command, floor raised above the measured value: ``` $ pnpm test:coverage --merge-reports --coverage.reporter=text --coverage.thresholds.lines=99 ERROR: Coverage for lines (77%) does not meet global threshold (99%) exit 1 ``` ## ⛔ The half this PR does NOT fix — it needs a decision above this card The coverage lane runs **only** on push to `main`/`develop`. An author adding a 6-second repo-sweep row cannot see this lane before merging; the first signal is after the row is already on `main`, on a red that blocks nothing. That is why the class recurs — this file's own comment records objectui#8545 pricing two earlier episodes at **84** and **87** consecutive unevaluated pushes, and this one ran to **116**. ⇒ A budget alone postpones the next episode, it does not prevent it. Making the lane visible pre-merge is the structural fix, and the card rules out making it blocking — so the fork is the maintainer's, not this PR's. ## Verification - `pnpm exec vitest run --project unit scripts/__tests__/` — **157 files / 4625 tests passed**, exit 0 (this is the surface holding every gate that reads `ci.yml`). - `node scripts/check-changeset-presence.mjs` — exit 0, "no changeset is owed". - `node scripts/check-governed-queue-guard.mjs --test .github/workflows/ci.yml` — NOT GOVERNED (control: `AGENTS.md` returns GOVERNED, exit 3). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013VGeMu3p6qEFWR6K6GGLaW --- _Generated by [Claude Code](https://claude.ai/code/session_013VGeMu3p6qEFWR6K6GGLaW)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent c0dab26 commit 511e402

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,10 +1079,48 @@ jobs:
10791079
# defect wearing the other hat — and dropping the other two restores
10801080
# objectui#9177. `scripts/__tests__/coverage-shard-reporter-readability.test.ts`
10811081
# fails in both directions.
1082+
# ── Why this lane carries its own `--testTimeout` (objectui#9271) ────
1083+
#
1084+
# `vitest.config.mts` sets `testTimeout: 15000`. That budget is calibrated
1085+
# for the UNINSTRUMENTED lane (`test:` above, which runs on every event
1086+
# except push). This lane runs the same files under v8 coverage, and
1087+
# instrumentation is not free: the repo-sweeping rows under
1088+
# `scripts/__tests__/` — the ones that call `sweep(repoRoot)` /
1089+
# `analyze(repoRoot)` and walk the whole tree — take several times longer
1090+
# with the provider attached than without it.
1091+
#
1092+
# ⇒ the 15s budget has comfortable headroom uninstrumented and NONE here,
1093+
# so rows that pass everywhere else die in this lane on a timeout. A dead
1094+
# shard is not a failed gate, it is NO gate: `coverage-report` below gates
1095+
# every merge step on `needs.test-coverage.result == 'success'`, so one
1096+
# timed-out row skips the merge and the thresholds are never evaluated at
1097+
# all. objectui#9271 measured 116 consecutive pushes to `main` in that
1098+
# state; the comment above records objectui#8545 pricing two earlier
1099+
# episodes of the same shape at 84 and 87 pushes.
1100+
#
1101+
# ⛔ This is NOT a performance budget and must not be read as one. The
1102+
# timeout is a hung-test detector, and the detector that guards day-to-day
1103+
# work is the 15s one in the uninstrumented lane — which is UNCHANGED, and
1104+
# is the lane that actually runs before a merge. This number only stops
1105+
# this lane from killing rows that are doing exactly what they should.
1106+
#
1107+
# ⭐ Re-derive the ratio rather than trusting a figure written here
1108+
# (AGENTS.md #5 rule #9) — same tree, same runner, the flag set below as
1109+
# the only variable:
1110+
#
1111+
# pnpm exec vitest run --project unit --testTimeout=900000 \
1112+
# --reporter=verbose scripts/__tests__/check-i18n-dead-keys.test.ts
1113+
# # then again with --coverage and compare the per-row ms
1114+
#
1115+
# ⚠️ Raising this cannot cost the job its own budget: `timeout-minutes: 40`
1116+
# above is roughly twice the wall clock the slowest shard has been using,
1117+
# and letting a row finish instead of killing it at 15s adds only the
1118+
# difference, not a re-run.
10821119
- name: Run tests with coverage (shard ${{ matrix.shard }}/4)
10831120
run: >-
10841121
pnpm test:coverage --reporter=blob --reporter=default
10851122
--reporter=github-actions --shard=${{ matrix.shard }}/4
1123+
--testTimeout=60000
10861124
--coverage.thresholds.lines=0 --coverage.thresholds.functions=0
10871125
--coverage.thresholds.branches=0 --coverage.thresholds.statements=0
10881126

0 commit comments

Comments
 (0)