From 6ab91ead9cb3d9d501566c5e5f1e98ceec1c2fdd Mon Sep 17 00:00:00 2001 From: Eureka Date: Thu, 8 Oct 2026 15:22:00 +0200 Subject: [PATCH] briefs: canonical wait block drops WAIT_FROM, states fresh log path and exit 3 Co-Authored-By: Claude Opus 5.5 --- references/briefs.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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`