Skip to content

Require unittest completion before isolated module success - #2579

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
ywz65:ywz65/n30-r015-research
Oct 16, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
ywz65:ywz65/n30-r015-research

Conversation

@ywz65

@ywz65 ywz65 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

A unittest load_tests hook can raise SystemExit(0) before discovery finishes. The isolated runner previously treated that zero process exit as a pass and printed PASS all 2 test modules in the reproduced two-module fixture, although only the healthy module completed.

Require a per-child completion token written only after unittest.main(..., exit=False) returns a successful result, together with exit status zero. Preserve the original discovery arguments seen through sys.argv, ordered captured output, independent interpreters, concurrent scheduling and assertion protection. Completed empty and skipped suites retain their existing behavior. This is a guard against premature termination, not hostile test code forging the token.

Validation: all eight focused end-to-end tests pass under -I -O -B on Windows/Python 3.12.14 and 3.14.5 with workspace TEMP/TMP. Controls include discovery-time SystemExit(0), execution-time os._exit(0), exact child argv, valid empty/skipped suites, ordinary failures, concurrency and optimized-parent assertion coverage. The actual before/after witness changes from false PASS/exit0 to identified incomplete module/exit1. No full selected-frontier replay or speed claim.

Started from canonical main 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, priority revision 4; the prescribed baseline binding check passed. The documentation records the changed verifier-engineering scope and credits the inherited isolated scheduler and assertion guard. No frozen inputs or selected frontier change. Prepared by ywz65 with OpenAI Codex assistance.

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.

2 participants