fix(hopper): stop Linux demo children when the REA owner exits (#2499)

Bind the owned demo helper to REA's private stdin stream and unwind child
cleanup on EOF during startup or analysis. Verify graceful and SIGKILL owner
exit through real CLI/MCP workflows and preserve unrelated processes.

Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
This commit is contained in:
Ysopwnable
2026-10-13 12:59:22 +08:00
committed by GitHub
parent d867136cec
commit c105391db5
9 changed files with 412 additions and 9 deletions
+3
View File
@@ -413,6 +413,8 @@ const launchHopperProcess = async (input: {
runId: input.session.runId,
expectedCommand: ownershipCommand,
hostEnvironment: input.options.environment,
// The helper observes EOF when this REA process exits, including SIGKILL.
stdin: "pipe",
...(input.signal === undefined ? {} : { signal: input.signal }),
});
return spawn(input.argumentsForTarget);
@@ -434,6 +436,7 @@ export const linuxDemoLaunch = (
return undefined;
const helperArguments = [
options.demoHelperPath,
"--owner-stdin",
"--strategy",
strategy ?? "direct",
...(strategy === "user-mount-namespace" ? ["--mount-private-x11"] : []),