Sfoglia il codice sorgente

test(agent-eval): restore the engine on INT/TERM too (CG-15)

Killing ab-new-vs-baseline.sh mid-baseline-arm left the engine checked out at
the baseline ref with the post-baseline files deleted, so every later build in
the working tree was silently the OLD code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Colby McHenry 1 mese fa
parent
commit
edce18f586
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      scripts/agent-eval/ab-new-vs-baseline.sh

+ 3 - 1
scripts/agent-eval/ab-new-vs-baseline.sh

@@ -58,7 +58,9 @@ cleanup() {
   git -C "$ENGINE" checkout HEAD -- $CHANGED 2>/dev/null
   ( cd "$ENGINE" && npm run build >/dev/null 2>&1 )
 }
-trap cleanup EXIT
+# INT/TERM too: killing the script mid-baseline-arm otherwise leaves the engine
+# checked out at the baseline ref, which silently poisons every later build.
+trap cleanup EXIT INT TERM
 
 mkdir -p "$OUT"
 echo "###### engine=$ENGINE  baseline=$BASE_REF"