Skip to content

Fix Windows replay lifetime with gated Job Object ownership - #2469

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
ywz65:codex/round-077-windows-replay-lifetime
Oct 16, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
ywz65:codex/round-077-windows-replay-lifetime

Conversation

@ywz65

@ywz65 ywz65 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

On native Windows, a verification leader that exits0 or7 can leave child solvers running after run_command returns. The exact current-main function fails the new retained-process-handle observer in both cases. Following PR2377's explicit Windows handoff, this change assigns a gated launcher to a kill-on-close Job Object before it may start the requested command, then terminates/reaps the job at success, failure, timeout or interrupted wait. Assignment failure leaves the command unstarted.

Eight native tests cover those boundaries, joined completion, parent-only cleanup mutations and assignment denial, and startup-hook isolation (including a flag-removal mutant and preserved verifier environment). CPython3.12.7 normal/optimized and3.14.5 native checks pass. Research unittest discovery passed72tests with3Linux-only skips before the focused startup-hook correction; all8final native tests pass; the selected source-binding baseline passes. See docs/research/windows-replay-lifetime.md for commands, OS contracts, evidence and remaining questions. The shared-runner CI invalidation policy is unchanged; local checks do not establish hosted CI or full mathematical replays.

Base 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, priority revision4; card portable-replay, scope 831cc1a3c8f9ff01b197. Scoped override follows the live lifetime defect. PR2377 is pinned at 5d444eee7dedd997c6094776fbb32ed19831e241; its pending POSIX fix is not imported. PR2452 (5208ab2780550273b1d8933ff584ce7581fb242d) covers the distinct live-leader timeout observer.

Ordinary Windows subprocess ownership only. Commands must join proof-relevant children and propagate errors. This is not a hostile-code sandbox, crash-atomic output proof, supplier improvement or new kappa. The implementation uses CPython's Windows Popen handle. POSIX behavior is unchanged.

Credit yssite for PR2377's diagnosis and handoff, Paul Romeo for the process-tree fixture lineage, and Douglas Colkitt/retained contributors for the runner. Prepared for ywz65 with substantial OpenAI Codex assistance in implementation, tests and writing. Independently reviewed by another agent; no human review claimed. Apache-2.0.

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