Review/1350 timeout boundary tests #1382

Open
github-bot wants to merge 2 commits from github-bot/gh-1382 into main AGit
Owner

@⁠xel1uz on GitHub · 2026-11-24 22:57 UTC · original
xel1uz:review/1350-timeout-boundary-tests → main · +14 −0 · 2 files · 2 commits · open

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.
**@⁠xel1uz** on GitHub · 2026-11-24 22:57 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1382) `xel1uz:review/1350-timeout-boundary-tests` → `main` · +14 −0 · 2 files · 2 commits · open Claimed in the coordination issue as: [GPU-TIMEOUT-OVERFLOW](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) (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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:49:31 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 15:15 UTC · original

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

**@⁠PierreEbele** on GitHub · 2026-11-25 15:15 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1382#issuecomment-7166563902) 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
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1382/head:github-bot/gh-1382'
git switch 'github-bot/gh-1382'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1382'
git switch 'github-bot/gh-1382'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1382'
git switch 'github-bot/gh-1382'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1382'
git switch 'main'
git merge --squash 'github-bot/gh-1382'
git switch 'main'
git merge --ff-only 'github-bot/gh-1382'
git switch 'main'
git merge 'github-bot/gh-1382'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.