fix: auto-clear stale heartbeat when process is dead

Add PID to heartbeat file. eval-watch checks process.kill(pid, 0) and
auto-deletes the heartbeat when the PID is no longer alive — no manual
cleanup needed after crashed/killed E2E runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-14 12:55:40 -05:00
parent 43fbe165a4
commit 4e31acbd47
2 changed files with 21 additions and 1 deletions
+1
View File
@@ -216,6 +216,7 @@ export async function runSkillTest(options: {
const toolDesc = `${item.name}(${truncate(JSON.stringify(item.input || {}), 60)})`;
atomicWriteSync(HEARTBEAT_PATH, JSON.stringify({
runId,
pid: proc.pid,
startedAt,
currentTest: testName,
status: 'running',