diff --git a/scripts/run_guard3b_overnight_spark.sh b/scripts/run_guard3b_overnight_spark.sh index 77c9ff0..883e073 100755 --- a/scripts/run_guard3b_overnight_spark.sh +++ b/scripts/run_guard3b_overnight_spark.sh @@ -50,6 +50,10 @@ train() { docker wait "$CANARY" > "$RUN_ROOT/canary_exit_code.txt" docker logs "$CANARY" > "$RUN_ROOT/canary_training.log" 2>&1 +if [[ "$(cat "$RUN_ROOT/canary_exit_code.txt")" != "0" ]]; then + printf '{"finished_at":"%s","status":"CANARY_FAILED"}\n' "$(date -Iseconds)" > "$RUN_ROOT/program_state.json" + exit 1 +fi cp "$PROJECT/artifex_overnight/guard3b_v03_canary/pilot_metrics.json" "$RUN_ROOT/canary_metrics.json" # Base and the initial Challenger use the identical fixed harness/version.