Skip to content

ci(test-python): refresh suite-seconds and plan up to 5 legs - #9052

Merged
kyle-sexton merged 3 commits into
mainfrom
ci/rebalance-test-python-legs
Oct 22, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
ci/rebalance-test-python-legs

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

No related issue: main verify cancelled at test-python (3)'s limit (run 39733925888)

Summary

The verify run on 65928077 was cancelled when test-python (3) reached its 7-minute limit at 435 s. The planner splits the Python suites across legs using scripts/suite-seconds.txt. Its Python values, measured on 2026-10-19, now undercount four planning suites by 21 to 30 s each (shared/tests/test_server.py, test_share.py, test_tunnel.py, surface/test_exporters.py). As a result, legs the planner sized at 291 s ran about 340 s of suites. With 36 to 56 s of setup on top, those legs came within one slow runner of the limit.

Fix

  • Re-measured every Python suite from three complete whole-tree runs (39726045512, 39727110042, 39732992257) and wrote the median of the three for each suite. 46 values changed, and 11 suites the file did not list were added. Shell suites and the timeout are untouched.
  • The cancelled run was left out of the sample because its leg 3 was cut off mid-suite.
  • Raised the test-python leg cap in scripts/plan-test-lanes.sh from 4 to 5. Balanced over 4 legs, the refreshed 1272 s of suites still leaves almost no headroom. Updated the pinned planner test and the sizing comment in pr-require-checks.yml to match.

Verification

Planner totals for the whole tree (scripts/plan-test-lanes.sh, suite-seconds per leg):

leg 0 leg 1 leg 2 leg 3 Python total
before, as planned 292 291 291 291 1165
before, re-scored with the new medians 291 302 339 340 1272
after the refresh, 4 legs 318 318 318 318 1272

After the refresh and the cap of 5: 255 / 255 / 254 / 254 / 254 s (1272 total), so about 311 s of wall with up to 56 s of setup, against the 420 s limit.

  • The heavy legs in the re-scored row match what CI measured. Across the three runs, the two heaviest legs ran 331 to 354 s of suites, and the lightest ran 248 to 304 s.
  • These figures are planned, not measured. This draft does not run the test lanes, so the new balance will first show on the next whole-tree run. The planner's 1-second floor per suite makes the planned figures slightly high.
  • scripts/plan-test-lanes.test.sh: PASS=41 FAIL=0. Its 5-leg packing case expects hand-computed values: 200/190/170/180/185 s.
  • actionlint .github/workflows/pr-require-checks.yml: clean.
  • The leg count's consumers: the test-python matrix reads python_legs through fromJSON and hard-codes no leg list. ci-status aggregates toJSON(needs), which gives one result per matrix job, not per leg. The main ruleset requires only ci-status. No script outside a fixture names a test-python (N) leg.
  • scripts/check-affected.sh --tests on the second commit: every selected shell suite passed except scripts/ci-test-node-stop-commands.test.sh and scripts/run-hygiene-gate.test.sh. Both stop because this machine lacks PyYAML (.github/requirements-ci.txt), not because of this change. This machine also has no pytest, so no Python suite ran locally.

Why 5 legs. With 4 legs, each leg plans at 318 s of suites. Adding up to 56 s of setup and about 35 s of run-to-run spread puts the worst case near 409 s, against a 420 s limit. With 5 legs, each leg plans at 255 s, so the worst case is near 346 s.

Left out: a live CI run of the new plan, which needs the PR marked ready or a dispatch.

Related

  • In the three sampled runs, whole-tree legs ran 270 to 391 s of wall at 4 legs.
  • About half of the Python time is in six planning suites: plugins/planning/surface/test_server.py 201 s, test_exporters.py 132 s, shared/tests/test_server.py 124 s, test_share.py 123 s, surface/test_round.py 98 s, and test_tunnel.py 50 s (up from 25 s). None of them has an obvious trivial waste. The sleeps in shared/tests/test_server.py wait out its one-write-a-second throttle, which is the behavior under test.

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 22, 2026 02:44
main's verify on 6592807 was cancelled when test-python (3) hit its
7-minute limit. The planner balanced the legs on Python medians from
2026-10-19 that undercounted the planning suites by 20-30 s each, so two
legs ran about 340 s of suites against a planned 291 s. Re-measure every
Python suite as the median of runs 39726045512, 39727110042 and
39732992257 and add the 11 suites the file did not list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With refreshed suite-seconds the whole tree holds 1272 s of Python
suites, so 4 legs plan at 318 s each, about 409 s of worst-case wall
against the 7-minute limit. 5 legs plan at 255 s, about 311 s of wall.
Update the sizing comment in pr-require-checks.yml to match.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton changed the title ci(test-python): refresh Python suite-seconds so the legs balance ci(test-python): refresh suite-seconds and plan up to 5 legs Oct 22, 2026
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 22, 2026 08:17
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T08:19:49.466704Z 5da9b4d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 5da9b4ddc349d66615e5b3e05b05f17ed80c0319: 0 finding(s), 0 as inline comments.

No security issues found in this PR at head 5da9b4d.

The diff changes four files:

  • .github/workflows/pr-require-checks.yml: comment text only. There is no change to triggers, permissions, steps or expressions.
  • scripts/plan-test-lanes.sh: the test-python leg cap goes from 4 to 5 (pack python 180 5 0 1), plus a matching comment. The value is a numeric constant and takes no user-controlled input.
  • scripts/plan-test-lanes.test.sh: updated expectations for the 5-leg plan.
  • scripts/suite-seconds.txt: refreshed timing numbers for the test suites.

None of the files is a plugin manifest, so there is no manifest <field> line to report. The diff does not delete or soften any standing instruction (CLAUDE.md, a rules file, a skill or agent body, or a hook allowlist).

Because there is no security-relevant surface, I ran no hunter or verifier subagents.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 5da9b4ddc349d66615e5b3e05b05f17ed80c0319: 0 finding(s), 0 as inline comments.

No findings. I reviewed all four changed files and found nothing that fails.

  • Packing test: I worked the 5-leg case in scripts/plan-test-lanes.test.sh by hand. The suites are p=200, q=100, r=190, s=110, t=95, u=90, v=80 and w=60, which total 925. Packed longest first onto the least-loaded leg, the five legs come to 200, 190, 170, 180 and 185 s. That matches the new expected string and the updated comment, and [0,1,2,3,4] is the right leg list. I could not run the test script here: the sandbox needed approval, so this is hand-checked, not run.
  • Cap change: pack python 180 5 0 1 is the only code change, and the planner header comment now says up to 5. The test-python matrix reads python_legs through fromJSON, so it hard-codes no leg list. A grep of .github, scripts and docs found no remaining 4-leg assumption.
  • Sizing comment: In pr-require-checks.yml, 255 s per leg (1272 s over 5 legs is about 254) plus up to 56 s of setup gives about 310 s. That fits the unchanged 7-minute timeout.
  • scripts/suite-seconds.txt: The data change is internally consistent with the header's provenance note. I did not re-check the 46 changed and 11 added values against the CI run logs. The PR gives them as medians of three runs, which I could not verify.
  • PR body: It uses No related issue: <reason> and has all four sections. There is no closing issue to check criteria against.
  • Unverified author claims: The PR's figures for planner totals, actionlint, PASS=41 and the local shell suites are the author's own and I did not reproduce them.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit aca7562 Oct 22, 2026
67 of 68 checks passed
@kyle-sexton
kyle-sexton deleted the ci/rebalance-test-python-legs branch October 22, 2026 08:39
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