Skip to content

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

Closed
lixonik wants to merge 1 commit into
ProjectLeonida:mainfrom
lixonik:semantic-worker-result-required
Closed

lixonik wants to merge 1 commit into
ProjectLeonida:mainfrom
lixonik:semantic-worker-result-required

Conversation

@lixonik

@lixonik lixonik commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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.

@whoalin1

Copy link
Copy Markdown
Contributor

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.

@lixonik
lixonik force-pushed the semantic-worker-result-required branch from 1b121e3 to 4791919 Compare November 26, 2026 05:46
@github-actions github-actions Bot removed the needs rebase Conflicts with the base branch: rebase it on main label Nov 26, 2026
@DadaCap

DadaCap commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

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).

@DadaCap DadaCap closed this Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants