Skip to content

Commit b070162

Browse files
committed
CI: t15 diagnostic printed the report, not the error
The block dumped the last 25 lines of srcmode.log, which turned out to be the evidence report itself -- correctly saying ESCROW_PIPELINE=FAIL and DISCOVERY=NOT_RUN, and saying nothing about why, because nse_die writes its message long before the exit trap writes the report. Diagnostics that only reach the tail of a log are diagnostics about log formatting. It now prints the matching error lines, the stage progress, and a shorter tail. Incidentally the report-on-failure machinery (u08) is confirmed working in the field: a pipeline that died in discover still produced a full report with every later stage marked NOT_RUN. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Eydip5xfXMqeno9k1c6DEa
1 parent 9c118f8 commit b070162

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎tests/run-tests.sh‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,16 @@ else
438438
if [ "$rc" -ne 0 ]; then
439439
# A failing test that points at a log file is useless to anyone reading CI
440440
# output. Print the reason here.
441-
echo " --- why t15 failed: last 25 lines of srcmode.log ---"
442-
tail -25 "$WORK/srcmode.log" 2>/dev/null | sed 's/^/ | /'
441+
# The tail was the evidence report, which correctly said the pipeline
442+
# failed -- and said nothing about why, because nse_die writes its message
443+
# far earlier. Print the error itself, and the stage progress around it.
444+
echo " --- why t15 failed: the error ---"
445+
grep -n -m3 -E 'nix-source-escrow: (error|warning):|error:' "$WORK/srcmode.log" 2>/dev/null \
446+
| sed 's/^/ ! /' || echo " ! (no error line found)"
447+
echo " --- stage progress (==> lines) ---"
448+
grep -n '^==>' "$WORK/srcmode.log" 2>/dev/null | tail -12 | sed 's/^/ | /'
449+
echo " --- last 12 lines ---"
450+
tail -12 "$WORK/srcmode.log" 2>/dev/null | sed 's/^/ | /'
443451
if [ -f "$SRC_OI" ]; then
444452
echo " --- its verdict ---"
445453
jq -r '" | result=\(.result) step=\(.failedStep) reason=\(.reason // "none")"' "$SRC_OI"

0 commit comments

Comments
 (0)