Honor short serial semantic test deadlines (SEMANTIC-RUNNER-SERIAL-DEADLINE) #2076

Merged
alexandersato0830 merged 4 commits from upstream-pr/2076 into main 2026-11-28 23:49:07 +00:00
alexandersato0830 commented 2026-11-25 19:38:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by alexandersato0830 on 2026-11-25T19:38:18Z.


Claimed in the coordination issue as: SEMANTIC-RUNNER-SERIAL-DEADLINE

What and why

The serial runner polls the child process every 200 ms so it can respond to an interrupt. A short --timeout can expire during that wait, and a test finishing before the poll returns was reported as successful. Use a monotonic deadline and bound each wait by the remaining time so the runner can report the timeout at the correct boundary.

Tested

  • Windows 11, Python 3.14.9. Main e18b59a reported success for a 90 ms fixture with a 30 ms limit. The patched CLI returned 1 with the timeout report, and the same fixture passed with a 1 s limit.
  • The clock-controlled regression failed on main and passed with the patch. tests/test_run_semantic_tests.py ran 27 cases with the POSIX signal case skipped and zero failures.
  • Verified git diff --check and the source-only check.

GPUs tested: n/a.

AI-assisted: yes.

  • Based on current main.
  • One topic.
  • Uses source and synthetic fixtures.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5497911729 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2076). Originally posted by [alexandersato0830](https://github.com/alexandersato0830) on 2026-11-25T19:38:18Z. --- Claimed in the coordination issue as: [SEMANTIC-RUNNER-SERIAL-DEADLINE](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172519361) ### What and why The serial runner polls the child process every 200 ms so it can respond to an interrupt. A short `--timeout` can expire during that wait, and a test finishing before the poll returns was reported as successful. Use a monotonic deadline and bound each wait by the remaining time so the runner can report the timeout at the correct boundary. ### Tested - Windows 11, Python 3.14.9. Main `e18b59a` reported success for a 90 ms fixture with a 30 ms limit. The patched CLI returned 1 with the timeout report, and the same fixture passed with a 1 s limit. - The clock-controlled regression failed on main and passed with the patch. `tests/test_run_semantic_tests.py` ran 27 cases with the POSIX signal case skipped and zero failures. - Verified `git diff --check` and the source-only check. GPUs tested: n/a. AI-assisted: yes. - [x] Based on current `main`. - [x] One topic. - [x] Uses source and synthetic fixtures.
DeadlyChirp commented 2026-11-26 10:01:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DeadlyChirp on 2026-11-26T10:01:23Z.


Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_run_semantic_tests.py: 26 passed, 1 skipped (the POSIX process-group SIGINT test), 33 subtests passed. On main the same file has 25 tests, all passing.

(AI-assisted test run; output checked by hand.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7188802490 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2076#issuecomment-7188802490). Originally posted by [DeadlyChirp](https://github.com/DeadlyChirp) on 2026-11-26T10:01:23Z. --- Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_run_semantic_tests.py`: 26 passed, 1 skipped (the POSIX process-group SIGINT test), 33 subtests passed. On main the same file has 25 tests, all passing. (AI-assisted test run; output checked by hand.)
MoonEyes commented 2026-11-28 11:23:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T11:23:35Z.


Blocker: this branch (head b8b192ea2) no longer merges into current main (4a54aedcb): content conflict in scripts/run_semantic_tests.py (tests/test_run_semantic_tests.py merges cleanly). Could you merge main into the branch (no rebase or force-push), resolve it, and rerun tests/test_run_semantic_tests.py?

AI-assisted check (Claude Code, Claude Opus 5.5), posted for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238520608 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2076#issuecomment-7238520608). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T11:23:35Z. --- Blocker: this branch (head b8b192ea2) no longer merges into current main (4a54aedcb): content conflict in `scripts/run_semantic_tests.py` (`tests/test_run_semantic_tests.py` merges cleanly). Could you merge main into the branch (no rebase or force-push), resolve it, and rerun `tests/test_run_semantic_tests.py`? _AI-assisted check (Claude Code, Claude Opus 5.5), posted for MoonEyes._
TheGeogeo commented 2026-11-28 23:38:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T23:38:15Z.


Tested f4112fca9 merged (no commit) with main aa918e5d9: Python 3.12.4, Windows 11 10.0.26300, CPU only. check_no_game_data.py is clean.

  • Green: tests/test_run_semantic_tests.py, 34 tests pass (1 skipped).
  • Red: with scripts/run_semantic_tests.py back to main, 1 test fails (Expected 'wait' to have been called once. Called 2 times.).
  • Merge order: this PR conflicts with #2201 (tests/test_run_semantic_tests.py) and #2073 (scripts/run_semantic_tests.py), per git merge-tree. The three runner PRs need to land one after the other.

No blocker from my side.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247563510 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2076#issuecomment-7247563510). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-28T23:38:15Z. --- Tested `f4112fca9` merged (no commit) with `main` `aa918e5d9`: Python 3.12.4, Windows 11 10.0.26300, CPU only. `check_no_game_data.py` is clean. - Green: `tests/test_run_semantic_tests.py`, 34 tests pass (1 skipped). - Red: with `scripts/run_semantic_tests.py` back to `main`, 1 test fails (`Expected 'wait' to have been called once. Called 2 times.`). - Merge order: this PR conflicts with #2201 (`tests/test_run_semantic_tests.py`) and #2073 (`scripts/run_semantic_tests.py`), per `git merge-tree`. The three runner PRs need to land one after the other. No blocker from my side. AI-assisted (Claude Code).
MoonEyes commented 2026-11-28 23:49:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T23:49:10Z.


Merged after TheGeogeo's red/green check (check) (Windows, Python tests, no GPU needed) and a local re-check here. Merged after local re-verification: this PR merged onto main 21ba178e9 without conflict, and its test file(s) (tests/test_bcpack_tool.py, tests/test_run_semantic_tests.py) pass there. Earlier today the same tests failed on main without the PR (red/green) and a bundle with other open PRs showed no new failures. check_no_game_data.py is clean. Windows 11, Python 3.14; no GPU needed for these tests.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247684089 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2076#issuecomment-7247684089). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T23:49:10Z. --- Merged after **TheGeogeo**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/2076#issuecomment-7247563510)) (Windows, Python tests, no GPU needed) and a local re-check here. Merged after local re-verification: this PR merged onto `main` 21ba178e9 without conflict, and its test file(s) (`tests/test_bcpack_tool.py`, `tests/test_run_semantic_tests.py`) pass there. Earlier today the same tests failed on `main` without the PR (red/green) and a bundle with other open PRs showed no new failures. `check_no_game_data.py` is clean. Windows 11, Python 3.14; no GPU needed for these tests. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
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!2076
No description provided.