Problem
wn-opencode timeout and stream-failure cleanup kills and reaps only the immediate OpenCode child PID. OpenCode can launch shell commands, test runners, language servers, and other descendants. Those processes can survive after the harness reports that the invocation was killed and may continue mutating the workspace.
Current evidence: integrations/opencode/marmot/src/opencode.rs spawns the child without a dedicated process group, while kill_and_reap calls start_kill/wait only on that Child. The timeout fixtures use exec sleep, so they do not exercise a non-exec descendant.
Expected behavior
Run each invocation in an isolated process group (or equivalent supported containment) and terminate/reap the whole invocation tree on idle timeout, total timeout, stream failure, and harness cancellation. Add a regression fixture that spawns a distinct descendant and proves it is gone after cleanup.
Scope note
Found while reviewing #830. This cleanup limitation predates that PR, so it should not block the idle-timeout change itself.
Problem
wn-opencodetimeout and stream-failure cleanup kills and reaps only the immediate OpenCode child PID. OpenCode can launch shell commands, test runners, language servers, and other descendants. Those processes can survive after the harness reports that the invocation was killed and may continue mutating the workspace.Current evidence:
integrations/opencode/marmot/src/opencode.rsspawns the child without a dedicated process group, whilekill_and_reapcallsstart_kill/waitonly on thatChild. The timeout fixtures useexec sleep, so they do not exercise a non-exec descendant.Expected behavior
Run each invocation in an isolated process group (or equivalent supported containment) and terminate/reap the whole invocation tree on idle timeout, total timeout, stream failure, and harness cancellation. Add a regression fixture that spawns a distinct descendant and proves it is gone after cleanup.
Scope note
Found while reviewing #830. This cleanup limitation predates that PR, so it should not block the idle-timeout change itself.