Repository navigation
fix(test): reap handoff fixture parents after setup errors - #190353
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR extends the existing fixture cleanup block to cover setup failures after parent-process creation. Example: The systemd boundary fixture's prepareState callback rejects with "fixture setup rejected".
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR: it repairs a concrete test-fixture process leak still present on main, with no actionable correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherManaged-update tests create a real parent process and generated handoff helpers around emulated service commands; the boundary fixture prepares their environment, observes outcomes, and cleans up child processes. flowchart TD
A[Lifecycle test] --> B[Boundary fixture]
B --> C[Real parent process]
B --> D[Environment and state preparation]
D --> E[Generated handoff helper]
B --> F[Existing cleanup owner]
F --> C
F --> E
Technical reviewBest possible solution: Keep parent creation followed immediately by registration of the existing cleanup owner, with all subsequent setup inside its try/finally. Do we have a high-confidence way to reproduce the issue? Current-main source shows setup rejection bypassing cleanup after spawning a real parent; the body reports a matching failing baseline, but this read-only review executed no target code. Is this the best way to solve the issue? This is the smallest complete repair: extend the existing lifecycle owner rather than add another cleanup path, and retain one regression for the observable child-close contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9a0ec72eb9ef. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +35, Other +2. Total +37 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 8:47 AM ET / 13:47 UTC. |
|
Merged via squash auto-merge.
|
What Problem This Solves
Fixes leaked parent processes when managed-update handoff test setup rejects after spawning its parent.
User Impact
No runtime or configuration change. Failed handoff fixture setup now finishes child cleanup before reporting the setup error.
Why This Change Was Made
The boundary fixture created its real parent before entering the existing cleanup block. Move that block to parent creation so file, profile, runtime, and state preparation share the same cleanup owner. This preserves normal systemd and launchd handoffs without adding another cleanup path.
Production delta: 0 lines. Test/support delta: +35 lines, including formatter reflow. The separate 35-line test-budget allocation covers one regression that observes the actual child close event; its own cleanup also reaps the child on the broken baseline. No changelog entry is needed for this test-only repair.
Evidence
closed === falseafter the asynchronous setup error. The test's fallback cleanup reaped that child.b2bfad1071b0cac22de5c80c19c28a0cce37216dthrough this exact candidate: scoped-clean through P0–P2, no actionable findings (correctness confidence 0.92). Independent lifecycle source review also found no cleanup gap. Signed published head:c519dbfcb38e3c76ae3eac0972f68cf2121d162f.