Skip to content

Commit 4e2869e

Browse files
committed
fix(devx): assembling the shard log must not replace the suite's exit status
A leg whose stall guard never got far enough to open its log would make `cat` non-zero, and under `set -e` that becomes the step's exit code -- the step would report the wrong reason for its own red, on exactly the failure path this job exists to describe. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
1 parent b5c2e07 commit 4e2869e

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,16 @@ jobs:
638638
--report-dir "$RUNNER_TEMP/stall-reports" -- "$@" || { STATUS=$?; break; }
639639
done
640640
641-
if [ -n "$LOGS" ]; then
642-
cat $LOGS > "$RUNNER_TEMP/test-core.log"
643-
fi
641+
# `|| true`, and only over logs that exist: a leg whose guard never got
642+
# far enough to open its log would otherwise make `cat` non-zero, and
643+
# under `set -e` that replaces the SUITE's exit status with cat's — the
644+
# step would report the wrong reason for its own red.
645+
: > "$RUNNER_TEMP/test-core.log"
646+
for LOG in $LOGS; do
647+
if [ -f "$LOG" ]; then
648+
cat "$LOG" >> "$RUNNER_TEMP/test-core.log"
649+
fi
650+
done
644651
exit $STATUS
645652
646653
# --summarize above costs nothing at runtime and writes

0 commit comments

Comments
 (0)