From edce18f586d679a7d74c93b2bff4688ce1d313a7 Mon Sep 17 00:00:00 2001 From: Colby McHenry Date: Tue, 4 Aug 2026 01:08:36 -0500 Subject: [PATCH] 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 --- scripts/agent-eval/ab-new-vs-baseline.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/agent-eval/ab-new-vs-baseline.sh b/scripts/agent-eval/ab-new-vs-baseline.sh index 53b57a4..ebc353c 100755 --- a/scripts/agent-eval/ab-new-vs-baseline.sh +++ b/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"