Repository navigation
Fix POSIX isolated-module capture drain after leader exit - #4779
Merged
Mister-Meeseeks merged 2 commits intoOct 23, 2026
Merged
Conversation
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A successful isolated unittest can finish while its ordinary POSIX child/grandchild still holds the runner's capture pipes. Previously,
communicatewaited for pipe EOF beforefinallycould clean that same process group: the default unlimited invocation waited indefinitely, and a finite budget converted the already-completedOKmodule to timeout 124. A real macOS fixture reproduced the difference by changing only descendant stdout/stderr inheritance (redirected: success in 0.067 s; inherited: rejected at the 3 s deadline).This repair recognizes an exited POSIX leader before the deadline, invokes the existing owned-group cleanup, then drains the original captured buffers with a bounded two-second cleanup wait. Actual exit status and the successful-unittest completion receipt remain required. Elapsed deadlines and cancellation retain priority; a newly observed late exit cannot become success.
This deliberately supersedes the old
test_completed_receipt_with_open_child_pipe_still_times_outexpectation. Completed modules now have the same cleanup policy whether ordinary descendants close their pipes or inherit them, matching #2906's closed-pipe POSIX case and #4683's Windows owned-job lifecycle. Proof-relevant subprocesses must still be joined by their tests and propagate their failures. Deliberately detached descendants are outside the owned-process-group contract; cleanup/drain failure never reports PASS. No frozen scientific source, selected frontier, Windows implementation or acceptance pin changes.Validation on macOS 27.0 arm64 / CPython 3.12.2:
test_isolated_test_*.py: 50 cases, 27 pass / 23 platform skips, 11.697 s at the follow-up. Together with the ten new cases: 60 total, 37 pass / 23 skips.run_modulesentry (8.499 s).isolated-test-bytecodeandisolated-descendant-bytecodepass (6.313 s / 22.600 s), preserving their original source/cache differentials and controls.git diff --checkpasses; only the four scoped files change. Author and committer are JoyboyBrian.Hosted CI for exact public head
8d00967e3942cfd85e19f30e72ea9f5e68bc8f7bhas completed with three successful checks and one inherited metadata failure. The Ubuntu plan/onboarding job actually ran all ten newtest_research_isolated_test_posix_pipescases and each passed, including Linux pidfd observation, timeout/cancellation, output preservation and both deadline controls (Ubuntu 24.04.5 / CPython 3.12.15; overall 356 tests,OK (skipped=11), 132.207 s). Both selected bytecode compatibility package jobs also passed.The sole failing
isolated-runner-successorjob stops before replay atworking source drift: certificates/selected-result.json. This exact failure was independently reproduced withpython3.12 -B scripts/research_package.py --package research/isolated-runner-successor --check-onlyusing the exact canonical base624de9dc66858af0945e5f8a0942488d62280d43checker, metadata and input files, with an isolated Git HEAD at that base. The unchanged package pin isbb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129; both base and PR head have selected-result SHA-2566fe0a099b89aa2aed796a13c3a21dafc63f3388ebf397464e44e0451893b9375. The package directory and selected-result file are unchanged by this PR. Its runner pinef5035e6…also already differs from basec2ba0ce2…. This historical admission obligation remains open; no frozen pin or acceptance list was refreshed, and CI is not fully green. No full repository, historical or mathematical suite was rerun.Exact reproduction commands, base hashes, policy scope and open questions are in
docs/research/isolated-test-posix-pipes.md. Base is canonical624de9dc66858af0945e5f8a0942488d62280d43, priority revision 7. Canonical investigation and scope update.Credit Nick Petalas (#2906 at
52b7b3f6cd3f12e34c2451c291a85fe9d1eff996), Mihir Srivastava (#4683 at02d43658b948db1922a23369b1fa2ba9bc4f8f58), ywz65, Paul Romeo, Aaron Wang/navinor, Douglas Colkitt and retained contributors. Both nearest predecessor PRs were live-verified merged. Prepared by JoyboyBrian with substantial OpenAI Codex assistance; no independent human review. Apache-2.0. This is verifier lifecycle tooling, not a new kappa or scientific admission.Final scoped overlap checkpoint: 299 open PRs at 2026-10-22 19:49:09 UTC, 3,721 Discussion records at 19:49:58 UTC, and all 6,319 in-scope local notes. Queries for
run_isolated_tests.py,inherited capture,pipe EOF,POSIX isolatedandcaptured pipereturned the own claim, coordinator pointer and credited predecessor scopes; no additional same-boundary repair was found in this coverage. Remote pagination and local inventory were complete; offline-staleness caveats remain. Root refreshed canonical main at this submission checkpoint and reported it unchanged.