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>
This commit is contained in:
Colby McHenry
2026-08-04 01:08:36 -05:00
co-authored by Claude Opus 5
parent 48a2309b92
commit edce18f586
+3 -1
View File
@@ -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"