fix(runner-e2e): bound inspection failure and graceful delivery races

Keep direct-child fallback bounded when process inspection fails, preserve incomplete cleanup evidence, and select graceful owners from the delivery snapshot without signaling already-covered descendants again.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-30 10:58:35 -05:00
1 parent 0ad2173bc1
commit 0499513435
7 files changed
+235 -49

No files matched your search

+3 -3
View File
@@ -1,4 +1,4 @@
import { spawn } from "node:child_process";
import { spawn, type ChildProcess } from "node:child_process";
import path from "node:path";
export interface ProcessObservation {
@@ -159,12 +159,12 @@ const diagnosticProcessKinds = new Set([
"tsx",
]);
export async function readProcessTable(): Promise<ProcessObservation[] | null> {
export async function readProcessTable(startInspector?: () => ChildProcess): Promise<ProcessObservation[] | null> {
if (process.platform === "win32") {
return null;
}
return await new Promise<ProcessObservation[] | null>((resolve) => {
const inspector = spawn(
const inspector = startInspector ? startInspector() : spawn(
"ps",
["-e", "-o", "pid=,ppid=,pgid=,lstart=,stat=,comm="],
{