From 29d50a805a71c063bb3d00ad35c68ffe616c767e Mon Sep 17 00:00:00 2001 From: RSI smoke Date: Tue, 13 Oct 2026 00:58:00 -0600 Subject: [PATCH] Fall back to direct pid kill when reaping the MCP fixture server (sandbox gate) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mcp-close test reaped its fixture server with a group kill only. In sealed RSI eval guests the group kill demonstrably misses (server alive 2s later, reap assert fails, baseline red) while direct pid kill — used by the descendant reap right below — works. Belt and suspenders: group kill first, then the server pid itself. No behavior change when the group kill lands. --- src/extensions/__tests__/runtime.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/extensions/__tests__/runtime.test.ts b/src/extensions/__tests__/runtime.test.ts index 5a3d9e8..89d384c 100644 --- a/src/extensions/__tests__/runtime.test.ts +++ b/src/extensions/__tests__/runtime.test.ts @@ -366,6 +366,13 @@ async function testMcpCloseRetainsFailedTransportForDispose(workspaceRoot: strin processRef.kill = originalKill if (serverPid > 0) { try { originalKill(-serverPid, "SIGKILL") } catch { /* fixture process group may already be gone */ } + // Fall back to the server pid itself: the group kill demonstrably + // misses in sealed guests (observed RSI eval failure), leaving the + // server alive for the reap check below. Direct kill matches the + // descendant reap; the pid is fixture-owned either way. + try { + originalKill(serverPid, "SIGKILL") + } catch { /* server may already be gone */ } assert.equal(await processIsGone(serverPid), true, "test reaps the MCP server after restoring real signals") } if (descendantPid > 0) {