[PR #1437] Fail semantic runs that exit without a trustworthy result (SEMANTIC-RUNNER-COMPLETION) #1467

Open
opened 2026-11-26 20:21:21 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1437
Author: @titoreinaldo
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: fix/semantic-runner-completion


📝 Commits (2)

  • 52557d5 Fail semantic runs without a completed unittest verdict
  • 84f8fee Cover early exits and masked unittest failures

📊 Changes

2 files changed (+73 additions, -25 deletions)

View changed files

📝 scripts/run_semantic_tests.py (+46 -25)
📝 tests/test_run_semantic_tests.py (+27 -0)

📄 Description

Claimed in the coordination issue as: SEMANTIC-RUNNER-COMPLETION (#14 claim).

What and why

An incomplete semantic run can report success. A synthetic module calling os._exit(0) during import leaves no unittest result; the parallel runner counts zero for that worker and accepts its process status, and the serial runner simply forwards success. An exit handler can also overwrite the status after unittest has completed with a failure.

Use unittest’s completed result as well as the process exit status in both modes. Status 0 without a result, or after unittest reported a nonzero status, is an error. Empty package initializers are still ignored based on the recorded result, and timeouts retain their existing diagnostics. Discovery rules are unchanged.

Tested

  • Both synthetic regressions fail against main 1154976d with either -j 1 or -j 2: four false-green cases before, all four detected after.
  • python -I tests/test_run_semantic_tests.py: 24 tests pass.
  • python -I scripts/run_semantic_tests.py tests/semantic -j 8: 476 files, 6,223 tests, zero failing files.
  • Compile, diff whitespace and no-game-data checks passed.

GPUs tested: none, Linux x86-64 / Python 3.12.14, CPU-only. No game files, keys, decryption, or online game services. AI-assisted: yes, OpenAI Codex.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1437 **Author:** [@titoreinaldo](https://github.com/titoreinaldo) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/semantic-runner-completion` --- ### 📝 Commits (2) - [`52557d5`](https://github.com/ubiquitarianism/leonida/commit/52557d5fc096faf9f55002426665678c46aabf82) Fail semantic runs without a completed unittest verdict - [`84f8fee`](https://github.com/ubiquitarianism/leonida/commit/84f8fee7320025c8ce331d4f0b32ccc8bc75cb99) Cover early exits and masked unittest failures ### 📊 Changes **2 files changed** (+73 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `scripts/run_semantic_tests.py` (+46 -25) 📝 `tests/test_run_semantic_tests.py` (+27 -0) </details> ### 📄 Description Claimed in the coordination issue as: SEMANTIC-RUNNER-COMPLETION ([#14 claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148212498)). ### What and why An incomplete semantic run can report success. A synthetic module calling `os._exit(0)` during import leaves no unittest result; the parallel runner counts zero for that worker and accepts its process status, and the serial runner simply forwards success. An exit handler can also overwrite the status after unittest has completed with a failure. Use unittest’s completed result as well as the process exit status in both modes. Status 0 without a result, or after unittest reported a nonzero status, is an error. Empty package initializers are still ignored based on the recorded result, and timeouts retain their existing diagnostics. Discovery rules are unchanged. ### Tested - Both synthetic regressions fail against main `1154976d` with either `-j 1` or `-j 2`: four false-green cases before, all four detected after. - `python -I tests/test_run_semantic_tests.py`: 24 tests pass. - `python -I scripts/run_semantic_tests.py tests/semantic -j 8`: 476 files, 6,223 tests, zero failing files. - Compile, diff whitespace and no-game-data checks passed. GPUs tested: none, Linux x86-64 / Python 3.12.14, CPU-only. No game files, keys, decryption, or online game services. AI-assisted: yes, OpenAI Codex. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#1467
No description provided.