fix(verification): retain orphan checks on clean Linux runners

This commit is contained in:
Luis Taffelli
2026-10-11 16:35:44 -03:00
parent 58d23e42b6
commit c039dd81d5
5 changed files with 113 additions and 1 deletions
@@ -0,0 +1 @@
export function assertCleanLinuxHopperRuntime(): Promise<void>;
@@ -0,0 +1,15 @@
import { execFile } from "node:child_process";
import { promisify } from "node:util";
const execFileAsync = promisify(execFile);
/**
* Observe leftover demo processes on a dedicated clean Linux runner, including
* groups reparented after their launcher exits. This is not ownership proof and
* never authorizes signaling; unrelated runtime processes also block this lane.
*/
export const assertCleanLinuxHopperRuntime = async () => {
const { stdout } = await execFileAsync("ps", ["-ax", "-o", "command="]);
if (/\/opt\/hopper\/bin\/Hopper|\bXvfb\b|hopper-demo-x11\.py/u.test(stdout))
throw new Error("Clean Linux runner retained a Hopper demo process");
};