Artifact

// Liveness = freshest of parsed-progress OR raw subprocess bytes. // Always <= progressAge, so absent a byte source this is unchanged. const livenessAge = now - Math.max(lastProgressAt, lastByteAt ?? 0); // Stall ONLY when the low-level byte signal is also stale. // dead socket -> no bytes -> aborts (correct) // alive-but-quiet -> bytes flowing -> long_running (no false abort) if (livenessAge > staleMs) return stalled(); // Blind-spot backstop: emitting bytes but zero parsed progress for an // unreasonably long time = livelock -> re-arm recovery. if (progressAge > progressCeilingMs) return stalled('alive_without_progress'); return longRunning();

60893c19-91fd-4edc-bfc2-0e85a89b07e5

// Liveness = freshest of parsed-progress OR raw subprocess bytes. // Always <= progressAge, so absent a byte source this is unchanged. const livenessAge = now - Math.max(lastProgressAt, lastByteAt ?? 0);

// Stall ONLY when the low-level byte signal is also stale. // dead socket -> no bytes -> aborts (correct) // alive-but-quiet -> bytes flowing -> long_running (no false abort) if (livenessAge > staleMs) return stalled();

// Blind-spot backstop: emitting bytes but zero parsed progress for an // unreasonably long time = livelock -> re-arm recovery. if (progressAge > progressCeilingMs) return stalled('alive_without_progress');

return longRunning();