mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-03 19:47:10 +00:00
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.
This commit is contained in:
1 parent
7f9c5df7db
commit
6263aa4c6c
1 file changed
+5
-1
@@ -89,7 +89,11 @@ esac
|
|||||||
code=$?
|
code=$?
|
||||||
|
|
||||||
run_dir="$(ls -d "$output"/*/ 2>/dev/null | tail -1)"
|
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
|
steps=0
|
||||||
[ -f "$trace" ] && steps=$(wc -l < "$trace" | tr -d ' ')
|
[ -f "$trace" ] && steps=$(wc -l < "$trace" | tr -d ' ')
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user