diff --git a/references/briefs.md b/references/briefs.md index a3664c0..1181190 100644 --- a/references/briefs.md +++ b/references/briefs.md @@ -335,11 +335,12 @@ pid with no match is exit 98. `tools/wait-on.sh pid []` is only for a process with no completion evidence; it prints `GONE (no completion evidence)` and its exit 0 means "gone", not "succeeded". `tools/wait-on.sh file ` is for an output file written last. The regex is an ERE; an invalid one is exit 3. -Use a fresh log path per job. If a log path is reused (Unity `-logFile`, a -re-run script), record where it ended at launch and pass it, so a stale done -line from the earlier job does not count: `WAIT_FROM=$(wc -c < 2>/dev/null -|| echo 0)` captured before the launch, then `WAIT_FROM= tools/wait-on.sh log - `. Same contract as the ygg-verify wait: pass a Bash tool `timeout` +Exit 3 means the regex is invalid: fix it, never retry it unchanged. +Every job gets a fresh log path (put the job's own unique name or a timestamp in +it; for Unity, a new `-logFile` path per launch), and a waiter is never pointed +at a log a previous job wrote: a reused log's old done line reads as success at +once, and an offset cannot fix that because truncating writers (`>`, Unity +`-logFile`) rewrite below it. Same contract as the ygg-verify wait: pass a Bash tool `timeout` of at least 280000 ms, it blocks at most 270 s, exit 0 is done with a bounded log tail, `RUNNING s` (exit 99) means call it again, exit 98 means the thing is gone with no completion evidence. Bare `true`, `echo waiting` and `sleep`