run_semantic_tests: fail workers that exit without a result (SEMANTIC-WORKER-RESULT-REQUIRED) #1749

Closed
lixonik wants to merge 1 commit from upstream-pr/1749 into main
lixonik commented 2026-11-25 11:13:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T11:13:31Z.


Claimed in the coordination issue as: SEMANTIC-WORKER-RESULT-REQUIRED

What and why

A parallel semantic test worker can exit 0 before writing its unittest result. With a second module that completes normally, the runner used to return success for the suite while omitting the unfinished module.

Require a valid unittest result for a successful worker exit. The runner now identifies the unfinished module and fails the suite. A reported count of zero still represents a real completed result, as for an empty package initializer.

Tested

  • Reproduced the false pass on the merge base with a synthetic worker that exits during a test and a healthy sibling. The new CLI regression fails against the base and passes with this change.

  • Ran all 23 semantic runner unit tests on Windows.

  • Passed the no-game-data scan and git diff --check.

  • Ran the complete semantic suite on Windows: 488 files, 6,260 tests, zero failed files.

GPUs tested: n/a (CPU-only test runner)

AI-assisted.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5490237073 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1749). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-25T11:13:31Z. --- Claimed in the coordination issue as: [SEMANTIC-WORKER-RESULT-REQUIRED](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7160571651) ### What and why A parallel semantic test worker can exit 0 before writing its unittest result. With a second module that completes normally, the runner used to return success for the suite while omitting the unfinished module. Require a valid unittest result for a successful worker exit. The runner now identifies the unfinished module and fails the suite. A reported count of zero still represents a real completed result, as for an empty package initializer. ### Tested - Reproduced the false pass on the merge base with a synthetic worker that exits during a test and a healthy sibling. The new CLI regression fails against the base and passes with this change. - Ran all 23 semantic runner unit tests on Windows. - Passed the no-game-data scan and `git diff --check`. - Ran the complete semantic suite on Windows: 488 files, 6,260 tests, zero failed files. GPUs tested: n/a (CPU-only test runner) AI-assisted. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption.
whoalin1 commented 2026-11-25 11:25:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T11:25:25Z.


Independent verification (Windows, Python 3.11.9): read_count returns None on missing/invalid count; worker exit-0 without valid unittest result now fails the suite — mechanism correct. test_run_semantic_tests.py shows 3 failures that reproduce IDENTICALLY on origin/main (pre-existing/environmental — possibly Python-version sensitive; your report of all-pass on your box noted). The PR's new test passes standalone; compileall + line-endings + check_no_game_data clean. AI-assisted verification.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7161026937 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1749#issuecomment-7161026937). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T11:25:25Z. --- Independent verification (Windows, Python 3.11.9): `read_count` returns None on missing/invalid count; worker exit-0 without valid unittest result now fails the suite — mechanism correct. `test_run_semantic_tests.py` shows 3 failures that reproduce IDENTICALLY on origin/main (pre-existing/environmental — possibly Python-version sensitive; your report of all-pass on your box noted). The PR's new test passes standalone; compileall + line-endings + check_no_game_data clean. AI-assisted verification.
DadaCap commented 2026-11-28 07:38:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T07:38:51Z.


Thanks for this! Closing it as a duplicate of #1437 after a maintainer check that compared the two diffs commit by commit, not just the titles.

#1437 already does everything this pull request does (it fails a worker that exits 0 without writing its result), and it also covers the single-process -j 1 path and an exit code that disagrees with unittest's own result. #1437 is older and already contains this case as a test.

If you think something here is not covered by #1437, say so and we'll reopen it.

AI-assisted (Claude Code), posted for DadaCap (maintainer).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7236073886 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1749#issuecomment-7236073886). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T07:38:51Z. --- Thanks for this! Closing it as a duplicate of #1437 after a maintainer check that compared the two diffs commit by commit, not just the titles. #1437 already does everything this pull request does (it fails a worker that exits 0 without writing its result), and it also covers the single-process `-j 1` path and an exit code that disagrees with unittest's own result. #1437 is older and already contains this case as a test. If you think something here is not covered by #1437, say so and we'll reopen it. _AI-assisted (Claude Code), posted for DadaCap (maintainer)._

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