Skip to content

CI: nightly durations calibrated to wall x JOBS; Gate leg caps floored at 1.3x slowest seen (Part of #5133, #5919) - #6735

Merged
squid-protocol merged 1 commit into
mainfrom
ci-durations-basis
Oct 26, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
ci-durations-basis

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Part of #5133 and #5919. This fixes a red check that would hit every PR.

What broke.

I reproduced this from the nightly's own test-durations-part-* artifacts.

Fix.

  1. calibrate_test_durations.py scales a part to wall × JOBS, the serial-equivalent basis the planners divide by. --jobs defaults to suite_shard_plan.JOBS, so the workflow call is unchanged. pytest-split's ratios don't change. On today's parts this gives about 2,205 s, close to the raw 2,137 s.
  2. suite_shard_plan.gate_plan floors each leg's cap at 1.3 × SLOWEST_SEEN_MIN, which moved here from the test, capped by the ceiling. A durations cache on any basis can no longer plan a cap below a time a leg has actually taken. The test now checks the planned legs against the planner's measured table.

Plans from today's cache.

Splits Caps
As stored 1 per leg 20-22 min (fails)
×JOBS (the fix) 2 per leg 22-27 min

All legs pass the headroom test.

Tests: test_calibrate_test_durations.py and test_suite_shard_plan.py each gain a regression test (wall × jobs; a cache at 1/4 the committed seconds still respects the floor). 67 tests across the planner, calibration and workflow files pass. pr_gates --only lint audits passes.

Ops note (owner action): today's bad cache entry still plans 1-part legs, and the floor alone can't fix that. Delete it so restores fall back to the 10-12 cache, which PRs used until this morning: gh cache delete test-durations-40306058375 -R squid-protocol/gitgalaxy. If it isn't deleted, it is replaced by the first nightly after this merges.

🤖 Generated with Claude Code

…d at 1.3x the slowest seen (Part of #5133, #5919)

The first stored nightly cache (2026-10-26 10:21, run 40306058375) summed each part to its bare pytest wall: 731 s for
28,832 tests against 2,137 s recorded. suite_shard_plan reads serial seconds and divides by JOBS, so every Gate leg
planned as 1 part at the 20-22 min floor and every PR's test_every_leg_cap_has_headroom_over_the_slowest_seen_time
failed (first seen on #6734). calibrate_test_durations.py now scales a part to wall x JOBS (the ratios pytest-split
balances by are unchanged); the planner floors each leg's cap at 1.3x its slowest seen minutes (moved from the test).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant