Repository navigation
fix(supervisor): reap only leased process descendants - #29
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughLinux descendant reaping now targets the leased process group. New Linux tests verify that a backend in a separate session remains reachable after the supervisor exits. The README describes both process ownership behaviors. ChangesProcess Reaping
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix
|
|
@greptileai review |
|
|
@greptileai review |
Linux runtime shutdown can hang after a backend starts a detached VM. The supervisor becomes the VM's subreaper, then waits for every adopted child even though that VM has its own session and resource lifetime. In Devsy's real-VM baseline, built-in MicroSandbox passes while the external runtime stalls after RunImage returns.
Reap only descendants in the leased plugin process group. Keep group termination, reserved leader identity, and cleanup of command children unchanged. Separately owned backend sessions survive the operation and transfer to the OS when the supervisor exits.
The Linux regression starts a real detached backend with separate stdio, verifies that supervisor shutdown completes, and checks that the backend still responds over a Unix socket. Readiness and shutdown share a deadline. It fails with the previous implementation and passes with this fix.
Validation:
go vet ./...passed, including existing child/grandchild ownership probes.CodeRabbit's docstring-coverage warning concerns internal helpers and test fixtures. Their names and the existing ownership comments express the contract; adding comments that repeat those functions would not improve clarity. Its proposed production backend retirement/recovery validation belongs to the Devsy lifecycle baseline, whose stop/start/recreate/delete checks exercise the separate VM owner; this SDK change preserves that ownership boundary.