From 6263aa4c6c0ae04a8415a4324bb45f089f5cdca2 Mon Sep 17 00:00:00 2001 From: PJ Date: Sun, 16 Aug 2026 01:08:27 +0530 Subject: [PATCH] fix(ci): a run that wrote no trace is not evidence about folio run_dir is empty when the run produced no output directory, and the fallback made trace ./trace.jsonl. A stray trace in the working directory was then read as this run's, so a run that wrote nothing reported 'found the submit bug' and exited 0, defeating the missing-trace check below it. --- .github/scripts/folio-run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/scripts/folio-run.sh b/.github/scripts/folio-run.sh index d4c526d..0977f91 100755 --- a/.github/scripts/folio-run.sh +++ b/.github/scripts/folio-run.sh @@ -89,7 +89,11 @@ esac code=$? run_dir="$(ls -d "$output"/*/ 2>/dev/null | tail -1)" -trace="${run_dir:-.}/trace.jsonl" +# No run directory means no trace. Defaulting the directory to `.` here reads a +# stray ./trace.jsonl and reports it as this run's evidence, which is how a run +# that wrote nothing at all reached "found the submit bug" and exit 0. +trace="" +[ -n "$run_dir" ] && trace="${run_dir}trace.jsonl" steps=0 [ -f "$trace" ] && steps=$(wc -l < "$trace" | tr -d ' ')