From 6997e4bdb571836411adcf12383daf2b6ee147cc Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 28 Jul 2026 15:03:10 -0700 Subject: [PATCH] fix: no unauthenticated path in live-server liveness greptile-apps[bot]: the legacy fallback (server.json without port or token) accepted a pid-only record on Windows without identity. Every server.json this codebase has ever written records port and token, so a record without them is malformed or foreign; it now classifies as not live and resolution falls to the durable-session tier, the correct recovery path for a crashed helper. The ps-based identity heuristic is gone with it: authentication or nothing. This work was produced with AI assistance (Claude Code). Co-Authored-By: Claude Code --- skill/scripts/live/roots.mjs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/skill/scripts/live/roots.mjs b/skill/scripts/live/roots.mjs index b786c3e8b..3c0a32e9e 100644 --- a/skill/scripts/live/roots.mjs +++ b/skill/scripts/live/roots.mjs @@ -330,14 +330,12 @@ function hasLiveServer(appRoot) { return false; } } - // Legacy server.json without a port/token: best-effort identity check. - if (process.platform === 'win32') return true; - try { - const command = execFileSync('ps', ['-p', String(pid), '-o', 'command='], { encoding: 'utf-8' }); - return /live-server|\b(node|bun)\b/.test(command); - } catch { - return false; - } + // Every server.json this codebase has ever written records port + token + // (see writeLiveServerInfo). A record without them is malformed or foreign + // and cannot be authenticated, so it does not count as a live helper; + // resolution falls to the durable-session tier, which is the correct + // recovery path for a stopped or crashed helper anyway. + return false; } const TERMINAL_SESSION_PHASES = new Set(['completed', 'discarded']);