Review/1350 timeout boundary tests #1382

Closed
xel1uz wants to merge 2 commits from upstream-pr/1382 into main
xel1uz commented 2026-11-24 22:57:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T22:57:51Z.


Claimed in the coordination issue as: GPU-TIMEOUT-OVERFLOW (original claim by @delysidemanYT1).

Depends on: #1350. This branch includes @delysidemanYT1's timeout validation. The follow-up commit adds a regression test.

What and why

#1350 caps LEONIDA_GPU_TEST_TIMEOUT before the value reaches the platform wait API. The new test checks the accepted upper limit and verifies that the runner rejects oversized values before starting a child process.

It covers three values:

  • 2147483 seconds: the timeout parser accepts the configured maximum.
  • 2147484 seconds: the runner rejects one second above the maximum.
  • 1e300 seconds: the runner also rejects a very large finite value.

For both rejected values, the test checks that the diagnostic names the setting and the supplied value, and that subprocess.run was never called.

Tested

  • Applied the new test to the base revision 4a50cafc. Both oversized-value cases failed as expected.
  • On 7d7fdce4, python -I tests/test_gpu_test_timeout.py passed all 9 tests on Windows with Python 3.14.6.
  • git diff --check and scripts/check_no_game_data.py passed for the changed files.

GPUs tested: n/a (timeout parsing and process-launch behavior).

AI-assisted: yes, OpenAI Codex.

Checklist

  • Verified a clean merge against upstream main at 28a32e19.
  • One topic: GPU test runner timeout validation and its regression coverage.
  • No game data, keys or decryption.
  • Translator contract table: n/a. No translator rule changed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5481739563 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1382). Originally posted by [xel1uz](https://github.com/xel1uz) on 2026-11-24T22:57:51Z. --- Claimed in the coordination issue as: [GPU-TIMEOUT-OVERFLOW](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145900346) (original claim by @delysidemanYT1). Depends on: #1350. This branch includes @delysidemanYT1's timeout validation. The follow-up commit adds a regression test. ### What and why #1350 caps `LEONIDA_GPU_TEST_TIMEOUT` before the value reaches the platform wait API. The new test checks the accepted upper limit and verifies that the runner rejects oversized values before starting a child process. It covers three values: - `2147483` seconds: the timeout parser accepts the configured maximum. - `2147484` seconds: the runner rejects one second above the maximum. - `1e300` seconds: the runner also rejects a very large finite value. For both rejected values, the test checks that the diagnostic names the setting and the supplied value, and that `subprocess.run` was never called. ### Tested - Applied the new test to the base revision `4a50cafc`. Both oversized-value cases failed as expected. - On `7d7fdce4`, `python -I tests/test_gpu_test_timeout.py` passed all 9 tests on Windows with Python 3.14.6. - `git diff --check` and `scripts/check_no_game_data.py` passed for the changed files. GPUs tested: n/a (timeout parsing and process-launch behavior). AI-assisted: yes, OpenAI Codex. ### Checklist - [x] Verified a clean merge against upstream `main` at `28a32e19`. - [x] One topic: GPU test runner timeout validation and its regression coverage. - [x] No game data, keys or decryption. - Translator contract table: n/a. No translator rule changed.
PierreEbele commented 2026-11-25 15:15:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T15:15:52Z.


Reviewed 7d7fdce49: the cap is the right one. Verified that raw subprocess.run overflows at timeout >= 2147484 s on this Python/Linux, that on main run_cmd/check.run die with an uncaught OverflowError for LEONIDA_GPU_TEST_TIMEOUT of 2147484 and 1e300, and that on the PR both exit with the clean one-line error before any launch, while 2147483 and the existing semantics are unchanged. Ran tests/test_gpu_test_timeout.py on the PR (9 OK) and on main with the new test copied in (fails exactly on the new subtests), plus the check-importing GPU-harness unit tests, compileall and check_no_game_data. No findings; one harmless nit: values just above 2147483 s (up to 2147483.647) are rejected although raw poll would still accept them, a 0.65 s over-rejection on a 24-day cap.

AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166563902 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1382#issuecomment-7166563902). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T15:15:52Z. --- Reviewed 7d7fdce49: the cap is the right one. Verified that raw `subprocess.run` overflows at timeout >= 2147484 s on this Python/Linux, that on main `run_cmd`/`check.run` die with an uncaught `OverflowError` for `LEONIDA_GPU_TEST_TIMEOUT` of 2147484 and 1e300, and that on the PR both exit with the clean one-line error before any launch, while 2147483 and the existing semantics are unchanged. Ran `tests/test_gpu_test_timeout.py` on the PR (9 OK) and on main with the new test copied in (fails exactly on the new subtests), plus the `check`-importing GPU-harness unit tests, compileall and check_no_game_data. No findings; one harmless nit: values just above 2147483 s (up to 2147483.647) are rejected although raw poll would still accept them, a 0.65 s over-rejection on a 24-day cap. AI-assisted review. **Recommendation:** Merge
OreoFR commented 2026-11-28 21:49:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:49:28Z.


Verified by OreoFR

  • Base: main 3408969a7 + PR head 7d7fdce49
  • Test: python -I tests/test_gpu_test_timeout.py
  • Red on main: 2 FAIL (SystemExit not raised for 2147484 and 1e300)
  • Green with the PR: 9 tests OK
  • Verdict: READY (contains the commit of #1350: merging one makes the other redundant)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246300377 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1382#issuecomment-7246300377). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:49:28Z. --- **Verified by OreoFR** - Base: main `3408969a7` + PR head `7d7fdce49` - Test: `python -I tests/test_gpu_test_timeout.py` - Red on main: 2 FAIL (SystemExit not raised for 2147484 and 1e300) - Green with the PR: 9 tests OK - Verdict: READY (contains the commit of #1350: merging one makes the other redundant) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
zmasi commented 2026-11-28 22:43:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T22:43:59Z.


Windows 11 + NVIDIA GeForce RTX 3090 Verification (7d7fdce498)

Verified 7d7fdce498c6977a0ff78fbe01a9a890b09f0ae3 merged cleanly onto main (adfb3821a) on native Windows 11 (10.0.26200, CPython 3.12.10) and NVIDIA GeForce RTX 3090 (Vulkan 1.4, VK_LAYER_KHRONOS_validation 1.4.363.1), with zero game data.

  • Red (main on Windows 11):
    • LEONIDA_GPU_TEST_TIMEOUT=4294968 crashes inside subprocess.run / _winapi.WaitForSingleObject (DWORD millisecond limit) with an unhandled OverflowError: timeout value is too large after spawning the child process.
    • LEONIDA_GPU_TEST_TIMEOUT=1e300 crashes with an unhandled OverflowError: timestamp out of range for platform time_t.
  • Green (main + #1382):
    • python -I tests/test_gpu_test_timeout.py -v: 9/9 OK (1.375s).
    • Live RTX 3090 boundary check (LEONIDA_VK_VALIDATION=1): LEONIDA_GPU_TEST_TIMEOUT=2147483 ((2**31 - 1) // 1000, valid on both POSIX signed 32-bit poll ms and Windows 32-bit DWORD WaitForSingleObject ms) launches and completes vk_compute_test.exe cleanly (rc=0, 0 validation errors), while 2147484 and 1e300 fail upfront with a clear SystemExit message before launching any GPU process.
  • Hygiene: check_no_game_data.py, test_ci_registration.py, test_docs_encoding.py, and test_text_write_line_endings.py all OK.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246941889 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1382#issuecomment-7246941889). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T22:43:59Z. --- ### Windows 11 + NVIDIA GeForce RTX 3090 Verification (`7d7fdce498`) Verified `7d7fdce498c6977a0ff78fbe01a9a890b09f0ae3` merged cleanly onto `main` (`adfb3821a`) on native Windows 11 (`10.0.26200`, CPython `3.12.10`) and **NVIDIA GeForce RTX 3090** (Vulkan `1.4`, `VK_LAYER_KHRONOS_validation` `1.4.363.1`), with zero game data. - **Red (`main` on Windows 11)**: - `LEONIDA_GPU_TEST_TIMEOUT=4294968` crashes inside `subprocess.run` / `_winapi.WaitForSingleObject` (`DWORD` millisecond limit) with an unhandled `OverflowError: timeout value is too large` after spawning the child process. - `LEONIDA_GPU_TEST_TIMEOUT=1e300` crashes with an unhandled `OverflowError: timestamp out of range for platform time_t`. - **Green (`main + #1382`)**: - `python -I tests/test_gpu_test_timeout.py -v`: **`9/9 OK`** (`1.375s`). - Live RTX 3090 boundary check (`LEONIDA_VK_VALIDATION=1`): `LEONIDA_GPU_TEST_TIMEOUT=2147483` (`(2**31 - 1) // 1000`, valid on both POSIX signed 32-bit `poll` ms and Windows 32-bit `DWORD` `WaitForSingleObject` ms) launches and completes `vk_compute_test.exe` cleanly (`rc=0`, `0` validation errors), while `2147484` and `1e300` fail upfront with a clear `SystemExit` message before launching any GPU process. - **Hygiene**: `check_no_game_data.py`, `test_ci_registration.py`, `test_docs_encoding.py`, and `test_text_write_line_endings.py` all `OK`. AI-assisted.
aslan2142 commented 2026-12-01 11:42:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:42:03Z.

Review: CHANGES_REQUESTED


This PR is stacked on open unmerged PR #1350 (carrying its runtime/test/shaders/check.py:691-699 change verbatim) and has no CI run yet. Please wait for #1350 to merge, then rebase so this PR carries only the timeout boundary regression tests in tests/test_gpu_test_timeout.py with a green CI pass.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130522909 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1382#pullrequestreview-6130522909). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:42:03Z. **Review:** CHANGES_REQUESTED --- This PR is stacked on open unmerged PR `#1350` (carrying its `runtime/test/shaders/check.py:691-699` change verbatim) and has no CI run yet. Please wait for `#1350` to merge, then rebase so this PR carries only the timeout boundary regression tests in `tests/test_gpu_test_timeout.py` with a green CI pass. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 17:22:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:22:57Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7319209350 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1382#issuecomment-7319209350). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T17:22:57Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

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!1382
No description provided.