fix(review round 1, own slice): plugin welcome-gap counting + null-id guard; bridge setup group-kill; Makefile staticcheck gate + worker-image rsync; deploy excludes

This commit is contained in:
Raphael Westphal
2026-08-18 18:25:02 +02:00
parent e626b9cc6e
commit 64e45e1a82
3 changed files with 32 additions and 8 deletions
+10 -2
View File
@@ -17,15 +17,23 @@ async function runRepoSetup() {
if (!existsSync(SETUP_PATH)) return;
console.error(`[lvmh-bridge] running repo setup: ${SETUP_PATH}`);
const code = await new Promise((resolve) => {
// detached + negative-pid kill: take down the whole process group so
// setup grandchildren cannot outlive the timeout (node-as-PID1 never
// reaps adopted orphans).
const child = spawn("bash", [SETUP_PATH], {
cwd: "/workspace",
detached: true,
stdio: ["ignore", "inherit", "inherit"],
});
const timer = setTimeout(() => {
console.error(
`[lvmh-bridge] setup timed out after ${SETUP_TIMEOUT_MS}ms, killing`,
`[lvmh-bridge] setup timed out after ${SETUP_TIMEOUT_MS}ms, killing process group`,
);
child.kill("SIGKILL");
try {
process.kill(-child.pid, "SIGKILL");
} catch {
child.kill("SIGKILL");
}
resolve(124);
}, SETUP_TIMEOUT_MS);
timer.unref?.();