Repository navigation
Stop owned POSIX descendants after direct script completion - #3644
Merged
Mister-Meeseeks merged 1 commit intoOct 20, 2026
Merged
Conversation
出力を閉じた子プロセスが残っていても成功を報告していたため、 POSIX グループの後始末とキャンセル時の所有権を同期する。 実 CLI 回帰テスト、CI 経路、凍結ソースを保持する履歴アダプターを追加する。
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.
Summary
When a script starts an ordinary POSIX solver with redirected output and exits,
run_parallel.pycan printPASS all 1 scriptsand return while the solver continues running. A failed leader leaves the same leak. Clean up the owned process group before unregistering the completed leader, serialized with the controller's cancellation snapshot. Preserve successful/failed output, exclude unrelated groups, and fail visibly if cleanup fails.Add five actual-CLI regressions and run them in the existing Ubuntu 3.12 reconciliation workflow. Extend its historical adapter with only the exact new runner hash; the frozen runner, reconciliation manifest and source pins remain unchanged. The new note records reproduction, scope and validation.
Based on canonical main
20ecf2891d80b5acf18d980b2164fb44ea7faa90, priority revision 6. Builds on ywz65's #2676 cancellation correction, its independent #2777 audit, and the isolated-test completed-leader cleanup. This covers normal leader completion; it makes no native Windows, detached-group, execution-deadline or mathematical claim.Test plan
Local environment: macOS arm64, CPython 3.12.14, Git 2.54.0.
python3.12 -W error -B -m unittest discover -s tests -p 'test_script_exit_cleanup.py' -v: all 5 pass; the original runner fails 3. Covers children/grandchildren, unrelated-process survival, success/failure output and an already-joined group. Parent-only cleanup mutation is detected; injected signal denial rejects success and preserves retry diagnostics.python3.12 -O -W error -B -m unittest discover -s tests -p 'test_script_exit_cleanup.py' -v: all 5 pass.python3.12 -W error -B -m unittest discover -s tests -p 'test_script_*.py' -v: 14 tests, 5 pass and 9 existing Linux/Windows observers skip on macOS.python3.12 -B scripts/replay_historical_check.py reconciliation92in its complete 383-file closure passes 92 pinned trees / 4,564 distinct blobs. Unknown live runner and corrupted frozen input both reject; original manifest and sources stay exact.python3.12 -B scripts/research_package.py --package research/isolated-test-bytecodeand--package research/isolated-descendant-bytecode: every registered command passes; declared outcomes remaincompleted/partial.git diff --check.python3.12 -B scripts/research_package.py --package research/historical-snapshot-one-passhas an unchanged baseline failure: 27 tests, 1 failure + 1 error, both from the unrelated tooling-ledger guard fordocs/ci-verification.md. The same result is reproduced with the actual registered CLI over 82 files read exactly from canonical main. No unrelated hash admission was added. Fork-hosted results are recorded below; upstream approval is separate.Hosted verification reviewed on 2026-10-18
58a754bf08ce63080822a28451aaa4952e2f6e2a: reconciliation92 workflow passes 92 pinned trees / 4,564 distinct blobs, all 6 worker-isolation tests and all 14 direct-script tests (including all 5 new regressions, no platform skips). The passing test process emitted ignored resource-finalization warnings in the existing cancellation controls; this is not a warning-free run.tooling-exactand the scoped owner/provenance diagnostics, then stops at the knowndocs/ci-verification.mdsuccessor guard addressed by #3648. Subsequent historical/reconciliation tests and the tracked-diff step were not reached. This does not establish that the complete tooling workflow passes after that correction.These are completed fork workflow results, not upstream maintainer approval or a mathematical replay.
Prepared for roger-sato with substantial OpenAI Codex assistance; independently reviewed with AI assistance. Apache-2.0.