mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 18:07:00 +01:00
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:
1 parent
0ad2173bc1
commit
0499513435
7 files changed
+235
-49
No files matched your search
@@ -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="],
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user