ci: the standard-library test steps run 8 files at a time instead of 4 (CI-STANDALONE-J8) #2924
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2924"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T18:39:01Z.
Claimed in the coordination issue as CI-STANDALONE-J8: https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7321253464
What and why
The two standard-library test steps of the
CIworkflow run their files 8 at a time instead of 4 (scripts/run_standalone_tests.py -j 8):check(Windows): "Tests (standard library only, no game data)"linux-python-and-viewer: "Tests (standard library only, Linux)"Nothing else changes: same selection, same runner script, same reports.
Baseline, main's last green
CIrun (17:50 UTC today,checkjob):checkjob-j 4linux-python-and-viewer,-j 4The runners have 4 cores. The bet is that each file spends much of its time starting a Python process and its imports, so more files at once shortens the step without asking for more runners. Splitting into more jobs was not taken: today the longer delay was jobs queued ~20 min for free runners, and more jobs would make that worse.
How it is judged
This pull request's own CI gives the after-timings of both steps. It is kept only if both steps are clearly shorter and the job as green as before; otherwise I close it. I will post the before/after numbers here once the run is done.
Review
A
.github/change: a second human maintainer is needed. Aslan agreed to the attempt (relayed by OreoFR from Discord: "sure, go ahead").AI-assisted: yes, Claude Code agent
oreofr-agentfor OreoFR. Nothing run locally beyond reading the workflow and the runner; the measurement is the CI run itself.🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T18:53:28Z.
Standalone worker cap and file selection verified at
968602e4onmain60f7dcd9. Applying the workflow predicate to both checkouts gave byte-identical manifests of 655 files. I also ran three synthetic repetitions at each workflow setting using the checked-outrun_standalone_tests.py. Peak concurrency was four on the old argument and eight on the new argument in every repetition. All 12 subprocesses finished in each run, both injected failures were annotated, and the runner returned exit status 1. This covers worker scheduling and failure reporting. Hosted CI duration remains a separate measurement.MEASURED with synthetic child processes on Linux. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-01T18:57:48Z.
Review: DISMISSED
Read at
968602e47. The change is what it says: two-j 4become-j 8, nothing else in the workflow moves.One blocker, one line:
tests/test_ci_registration.py:816(StdlibLoopTest.test_step_script_reads_the_check_loop) asserts that thecheckloop containspython -I scripts/run_standalone_tests.py -j 4. I ran that file on this head (Windows 11, Python 3.14): 18 tests, 1 failure, this one.checkandlinux-python-and-viewerrun the same file, so both go red. Changing the-j 4in that assertion to-j 8fixes it. (Line 780's copy is only the runner.)Not a blocker, for when the timings are in: the runners have 4 cores, so please give both steps before and after, as the description says, and look at the files that time out or start servers: those are the ones that get flaky with twice as many processes.
Not done: no run of the whole suite at
-j 8.AI-assisted: yes (Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T19:05:18Z.
Review: COMMENTED
The change is exactly the two stdlib steps (
ci.yml:118,:203) plus the pinned assertion (tests/test_ci_registration.py:816); the runner is untouched. Atbe4e237eon Windows I get 18/18 fortest_ci_registration.py, 5/5 fortest_run_standalone_tests.py, and the full manifest at-j 8runs 655 files exactly once, 0 failed (4m02s on a 32-core host). Failure reporting still names each file (scripts/run_standalone_tests.py:49-51), and there is no shard layer to drop or duplicate a path — I checked the selection and the run are set-identical. Dropping one path from the runner makes both the runner tests and the stdlib-loop test fail, so a silent loss is caught.Two caveats before merge:
test_gallery's 3 s loopback requests and its adjacent-ephemeral-port probe (test_gallery.py:734-756). The step time headroom is large (10.5 min of 30), so a slower step is acceptable; a timeout is the thing to watch.968602e4; the one blocker (the stale-j 4assertion) is fixed here, but this head has no review yet, and the before/after step timings the description promises are not posted.Merge is clean against current main, and no other open PR touches
.github/workflows/ci.yml(#2923 editsd3d12.yml).Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-01T19:28:30Z.
Before / after, MEASURED from the CI runs (one run each side, so runner-to-runner noise is not ruled out):
-j 4(run 46705679253 on27613ab6b, 17:50 UTC)-j 8(run 46720892738, headbe4e237e0)checkjob, wholeAll six checks green, same files run (655 on Windows). The second commit only moves
test_ci_registration.py's pinned runner line from-j 4to-j 8.Ready for review by a maintainer other than OreoFR (this is under his account).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T19:50:48Z.
Same-host timing for the full Linux standalone step at
93ffc482vs its #2924 merge treeab374c7d(be4e237e). I ran the exact workflow step from each tree three times on the same four physical Ryzen 7 7800X3D cores under Linux, using CPython 3.14.10.The eight-worker median was 19.167 seconds (14.39%) shorter. Every run exited 0 with the same 655 unique test files and zero file failures. This measures the local Linux step under four-core affinity. MEASURED, AI-assisted (Codex).