tests: the supplied-runtime build keeps its --jobs 3 on a 2-vCPU machine (OLD-10056) #692

Merged
Poussistar merged 1 commit from upstream-pr/692 into main 2026-11-24 13:09:44 +00:00
Poussistar commented 2026-11-24 12:16:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Poussistar on 2026-11-24T12:16:18Z.


Claimed in the coordination issue as: OLD-10056

What

tests/test_make_game_pipelines.py::test_windows_reuses_the_checker_from_the_supplied_runtime_build asks for --jobs 3 and then compares the value that reached the checker. make_game.main() clamps --jobs to the host CPU count first (leonida_tui.clamp_jobs, make_game.py:2989), so on a machine with fewer than three logical CPUs the assertion compares the clamped value and fails with 2 != 3.

#83 pinned the two other assertions of this class and missed this one.

Change

Pin make_game.leonida_tui.os.cpu_count to 16 around that main() call, with the same wording as the two pins #83 added in this file. Test-only: clamp_jobs and make_game.py are untouched, and test_jobs_default_calculation_scenarios keeps the clamp covered.

This carries the tests/test_make_game_pipelines.py part of my old pull request 10056, which draft #322 reopened verbatim from old-pr/10056 and which conflicts with main since #83 merged.

Tested

Base 21625bca8 (current main), Linux x86-64, Python 3.14.7, no game files, no GPU. python -I implies -E, so PYTHON_CPU_COUNT never reaches the test: the core count is patched in-process instead.

cores tests/test_make_game_pipelines.py before after
2 1 failure: AssertionError: 2 != 3 Ran 18 tests ... OK
4 (this machine) OK OK
256 OK OK

tests/test_make_game_argparse.py also passes at 2, 4 and 256 cores before and after (untouched).

Negative control: with the pin removed, the 2-core run is red again (FAILED (failures=1)), so the pin is what makes it host-independent.

AI-assisted. No game files.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5471965714 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/692). Originally posted by [Poussistar](https://github.com/Poussistar) on 2026-11-24T12:16:18Z. --- Claimed in the coordination issue as: `OLD-10056` ## What `tests/test_make_game_pipelines.py::test_windows_reuses_the_checker_from_the_supplied_runtime_build` asks for `--jobs 3` and then compares the value that reached the checker. `make_game.main()` clamps `--jobs` to the host CPU count first (`leonida_tui.clamp_jobs`, `make_game.py:2989`), so on a machine with fewer than three logical CPUs the assertion compares the clamped value and fails with `2 != 3`. #83 pinned the two other assertions of this class and missed this one. ## Change Pin `make_game.leonida_tui.os.cpu_count` to 16 around that `main()` call, with the same wording as the two pins #83 added in this file. Test-only: `clamp_jobs` and `make_game.py` are untouched, and `test_jobs_default_calculation_scenarios` keeps the clamp covered. This carries the `tests/test_make_game_pipelines.py` part of my old pull request 10056, which draft #322 reopened verbatim from `old-pr/10056` and which conflicts with `main` since #83 merged. ## Tested Base `21625bca8` (current `main`), Linux x86-64, Python 3.14.7, no game files, no GPU. `python -I` implies `-E`, so `PYTHON_CPU_COUNT` never reaches the test: the core count is patched in-process instead. | cores | `tests/test_make_game_pipelines.py` before | after | |---|---|---| | 2 | 1 failure: `AssertionError: 2 != 3` | `Ran 18 tests ... OK` | | 4 (this machine) | `OK` | `OK` | | 256 | `OK` | `OK` | `tests/test_make_game_argparse.py` also passes at 2, 4 and 256 cores before and after (untouched). Negative control: with the pin removed, the 2-core run is red again (`FAILED (failures=1)`), so the pin is what makes it host-independent. AI-assisted. No game files.
abnalstlll-byte commented 2026-11-24 12:18:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T12:18:09Z.

Review: APPROVED


Technical Review: APPROVE (OLD-10056)

  1. Root Cause & Correctness:

    • Accurately addresses the remaining host CPU core count dependency in test_make_game_pipelines.py by pinning make_game.leonida_tui.os.cpu_count to 16.
    • Prevents spurious test assertion failures on 2-vCPU CI workers where clamp_jobs clamps --jobs 3 to 2.
    • Clean test-only patch matching the established pattern from #83.
  2. Clean-Room & Verification:

    • Clean-room confirmed via check_no_game_data.py.
    • Verified 18/18 tests pass in test_make_game_pipelines.py.
    • Clean merge against main at 21625bca8 (0 conflicts).

LGTM!

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6039052794 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/692#pullrequestreview-6039052794). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T12:18:09Z. **Review:** APPROVED --- ### Technical Review: APPROVE (OLD-10056) 1. Root Cause & Correctness: - Accurately addresses the remaining host CPU core count dependency in test_make_game_pipelines.py by pinning make_game.leonida_tui.os.cpu_count to 16. - Prevents spurious test assertion failures on 2-vCPU CI workers where clamp_jobs clamps --jobs 3 to 2. - Clean test-only patch matching the established pattern from #83. 2. Clean-Room & Verification: - Clean-room confirmed via check_no_game_data.py. - Verified 18/18 tests pass in test_make_game_pipelines.py. - Clean merge against main at 21625bca8 (0 conflicts). LGTM!
Dezmonius commented 2026-11-24 12:44:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Dezmonius on 2026-11-24T12:44:12Z.


Independent Windows 10 22H2 check of ce5d643 against 21625bc, CPython 3.14.7. I used the interpreter flag python -I -X cpu_count=N and confirmed that os.cpu_count() in each process reported the selected value.

Logical CPUs Pipeline tests on main Pipeline tests on PR Argparse JobsHandlingTest
2 17/18, supplied-runtime case reports '2' != '3' 18/18 4/4 on both
4 18/18 18/18 4/4 on both
16 18/18 18/18 4/4 on both

This confirms the failure from the #322 review is fixed in the narrowed follow-up. The full pipeline test file and the four job-handling tests used synthetic fixtures.

AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7131848901 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/692#issuecomment-7131848901). Originally posted by [Dezmonius](https://github.com/Dezmonius) on 2026-11-24T12:44:12Z. --- Independent Windows 10 22H2 check of `ce5d643` against `21625bc`, CPython 3.14.7. I used the interpreter flag `python -I -X cpu_count=N` and confirmed that `os.cpu_count()` in each process reported the selected value. | Logical CPUs | Pipeline tests on main | Pipeline tests on PR | Argparse `JobsHandlingTest` | | --- | --- | --- | --- | | 2 | 17/18, supplied-runtime case reports `'2' != '3'` | 18/18 | 4/4 on both | | 4 | 18/18 | 18/18 | 4/4 on both | | 16 | 18/18 | 18/18 | 4/4 on both | This confirms the failure from the #322 review is fixed in the narrowed follow-up. The full pipeline test file and the four job-handling tests used synthetic fixtures. AI-assisted (Codex).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!692
No description provided.