Repository navigation
ci: restore the unit suite's timeout headroom — 25 → 45 minutes - #2395
Conversation
The cap's own comment reasons from a baseline that no longer exists: "the suite
runs ~7-8 min on a normal runner, but GitHub's shared runners vary ~2-2.5x". 25
was ~3x that baseline when it was chosen.
Measured across three consecutive runs of this workflow, same six-shard matrix:
13m 13m 14m 14m 16m 23m (all SUCCESS)
plus repeated `The operation was canceled` at exactly 25m. The suite roughly
doubled while the cap stood still, so 25 is now ~1.8x the baseline and a
23-minute shard clears it by two minutes. That is not headroom.
The cost lands on whoever has a PR open, and lands unfairly: the matrix runs
both sides, so the `base` shard is plain `dev` and reddens a PR that cannot have
caused it. That is the #2019 symptom, unchanged — its fix added the per-test
timeout, which addresses a stalled TEST and by construction cannot address a
slow RUNNER.
45 restores the ~3x the original comment was reasoning about.
It does not weaken hang detection in the way the number suggests.
`--timeout=300 --timeout-method=signal` is what turns a stalled test into a
named failure; this cap only ever catches what that cannot — a stall the signal
handler cannot interrupt, i.e. a C call holding the GIL or a process in
uninterruptible I/O. I reproduced one of the cancelled shards locally and found
exactly that shape: the process sat in `wchan = jbd2_log_wait_commit` (ext4
journal commit) and was still making progress, so it was slow rather than hung.
Those cases were anonymous cancels at 25m and will be anonymous cancels at 45m.
The only thing that changes is that a merely slow runner stops producing one.
The honest alternative is to make the suite faster, or shard it with xdist,
rather than keep buying minutes. That is worth doing and is not this change —
which is why the measured durations are recorded in the comment, so the next
reader sees the trend instead of only the new number.
Both jobs that run the full suite are raised; the 2-minute lint job and the
5-minute diff job are untouched.
Measured the failure rate — it is ~1 in 3 PRs, not an occasional flakeSampled the last 12 runs of this workflow, counting only shards that actually executed the suite (excluding superseded-run cancellations, which have short durations and would bias the rate down): The per-shard rate is only 6%, but the matrix runs six shards, so a third of all PRs get a spurious red. That is not a hypothetical: I hit it on four open PRs simultaneously today — #2379, #2382, #2386, #2393 — each with exactly one killed shard, and three of those on the base side, i.e. plain The distribution is the useful part: median 13.7m, p90 15.3m — the bulk is tight, and the kills are a far tail at ~1.8× the median, which is exactly the shared-runner variance this workflow's own header documents. So this is not a suite that is creeping up on the cap; it is a suite comfortably under it that loses a coin flip 6% of the time. At 45m the cap sits at ~3× p90, which absorbs that tail with room. Re-running is the only alternative and it costs ~14 minutes of compute per attempt at the same 6% odds, on a check whose semantic verdict ( One thing worth noting for whoever reviews this: the four PRs above are currently blocked on nothing but this. I re-ran all four shards rather than wait, but that is treating the symptom. |
Review sweep —
|
|
Fresh data from today (2026-08-26), same six-shard matrix, confirming the trend this PR records — and it is now actively costing merges:
Two independent PRs killed in the same hour, and two more that cleared the cap by 1–2 minutes. The #2393 is blocked on this. Worth merging ahead of the queue. |
|
One more data point, and it is the cleanest one available. PR #2408 changes six files, all of them CI scripts and templates — no backend code, no tests outside one new unit file. Its
All passed. But 21m18s is 3m42s from the cap, on a shard whose code is byte-identical to Separately, #2393's two shards that were cancelled at 25m yesterday passed on a plain re-run at 14m26s and 14m23s, no code change. That is the direct measurement of what the current cap costs: a spurious red plus a full six-shard re-run (~90 runner-minutes) to recover a result the first run would have produced in 26 minutes. |
obasilakis
left a comment
There was a problem hiding this comment.
Approving.
I checked the premise rather than the number. The cap's own comment reasons from a 7-8 min baseline that no longer exists, and the six measured durations in the diff (13/13/14/14/16/23) put a real shard two minutes under the old 25m cap. That is not headroom, and the base shard is plain dev — so the resulting red lands on a PR that cannot have caused it.
What I specifically checked before agreeing this does not blind anything:
--timeout=300 --timeout-method=signalis what turns a stalled test into a named failure. This job cap only ever catches what that cannot — a stall the signal handler cannot interrupt. Raising it changes which runner speeds produce an anonymous cancel, not which hangs are detected.- Both jobs that run the full suite are raised; the 2-minute lint job and the 5-minute diff job are untouched.
- The measured durations are recorded in the comment, so the next reader sees the trajectory rather than just a bigger number. That is the part that makes this defensible as a stop-the-bleeding change.
One non-blocking note: the honest alternative the body names — make the suite faster, or shard it with pytest-xdist — has no issue number attached. Worth filing, because the worst case being bought here is 6 shards x 45 minutes, and nothing in the tree will remind anyone that the trend is the actual problem.
…protects (ent#155) `portalFailedTurn.spec.js` asserted that at least TWO `retryable:` expressions exist in the component and that they are textually identical — encoding "send() and retry() cannot disagree" as "there are two copies that match". That is one shape which satisfies the rule, not the rule. Collapsing both `deliver()` callers onto a single `settleDelivery` makes the rule hold BY CONSTRUCTION — one expression, so disagreement is unrepresentable — and the guard failed on exactly the change that made it unbreakable. This is the class the ledger already names: a guard pinned to one literal source shape rejects the next legitimate edit, and the tempting fix is to delete the rule. So the rule is kept and the shape widened. Both are admissible, each with its own proof obligation: the shared shape (one expression) must show that every `deliver()` caller reaches it through the same settle function — with one expression the textual-agreement check is vacuous, so something has to take over its job — and the duplicated shape keeps the all-identical assertion. Verified against two mutants rather than assumed: a `retry()` that marks failure itself with a divergent rule trips the agreement check, and one that bypasses `settleDelivery` entirely trips the structural check. Full frontend suite: 60 files, 1330 tests, green. The two `pytest` legs on this PR are cancelled at `timeout-minutes: 25` — including the `base` leg, which carries none of this diff — and are waiting on #2395. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…#2280) CI's regression diff caught a genuine one: `test_2280_hosted_compose_parity` failed on all three head seeds and on none of the base seeds. `docker-compose.hosted.yml` landed on dev in #2280 while this branch was open — the pull-only twin of prod, with a guard asserting the two never drift except on build/image. This branch had already added `SUBSCRIPTION_SWEEP_CONCURRENCY` to dev and prod, so merging dev in produced exactly the drift that guard exists to catch. My own packaging check during /validate-pr had verified two compose files because the third did not exist when I ran it. Adds the var to the hosted compose and generalises my packaging test from "both composes" to the three STANDALONE deployment targets, with the exclusions named and justified: `gitea` and the two `override` files are overlays merged onto the base (`-f base -f overlay`) so they inherit its environment, `sibling` is the /verify-local harness, and `prod.enterprise` declares no backend environment block. Requiring the var in an overlay would be requiring it twice. A hardcoded list of three has the same rot the original two had, so a second test asserts no UNCLASSIFIED `docker-compose*.yml` exists — a genuinely new deployment target now fails loudly and must be classified deliberately rather than silently escaping the first list. Verified it fires by creating a fourth file. Also merges origin/dev (clean, no conflicts), which brings #2395 — the unit suite's 25→45 minute timeout headroom — so the shard that was cancelled twice on this PR should now be deterministic. Full local unit suite after the merge: 12637 passed, 1 failed — `test_1920`, which reproduces on a clean tree (it scans the private submodule; already a tracked follow-up). Refs Abilityai/trinity-enterprise#434 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The cap's own comment reasons from a baseline that no longer exists:
25 was ~3× that baseline when it was chosen. Measured across three consecutive runs of this workflow, same six-shard matrix:
plus repeated
The operation was canceledat exactly 25m on both sides. The suite roughly doubled while the cap stood still: 25 is now ~1.8× the baseline, and a 23-minute shard clears it by two minutes. That is not headroom.Why it matters beyond noise
The matrix runs both sides, so the
baseshard is plaindev— it reddens a PR that cannot have caused it. That is the #2019 symptom unchanged; its fix added the per-test timeout, which addresses a stalled test and by construction cannot address a slow runner.Observed on five open PRs today,
baseandheadroughly equally.Why this doesn't blind the hang detector
--timeout=300 --timeout-method=signalis what turns a stalled test into a named failure. This job cap only ever catches what that cannot: a stall the signal handler can't interrupt — a C call holding the GIL, or a process in uninterruptible I/O.I reproduced one of the cancelled shards locally to check which of those it was. The process sat in
wchan = jbd2_log_wait_commit(an ext4 journal commit) and was still making progress — slow, not hung. So these cases were anonymous cancels at 25m and will be anonymous cancels at 45m; the only thing that changes is that a merely slow runner stops producing one.What this is not
Buying minutes is not the fix. Making the suite faster — or sharding it with
pytest-xdist— is, and that is a separate change. This one stops the bleeding without hiding the trend: the measured durations above are recorded in the comment, so the next reader sees the trajectory rather than just a bigger number.Both jobs that run the full suite are raised. The 2-minute lint job and the 5-minute diff job are untouched.
🤖 Generated with Claude Code