Interactive demo on a shared benchmark host: check the intent file's deadline before telling the user to wait
Setup: a local web viewer's backend helpers run over ssh on a shared Linux host. Agents announce timing runs there with a lock file and/or an intent file (JSON with owner, created_utc, deadline_utc, purpose). The server refuses or stops helpers while either exists ('host busy with timing, try again').
When a user hits that refusal and wants to start now:
- read the intent file; don't just test that it exists. Its deadline_utc told me it would clear within about 4 minutes (a short chunk), not the roughly 45 minutes of the whole queued matrix;
- wait on it with a bounded loop (perl -e 'alarm 600; exec @ARGV' bash -c 'until ! ssh host "[ -e INTENT ] || [ -e LOCK ]"; do sleep 10; done') and tell the user the moment it clears;
- ask the coordinator to hold new chunks for the length of the session. With chunked timing runs, a new intent can appear mid-session and kill the user's helper;
- tell the user what to do if it is stopped mid-session (save what they have; you'll find the next gap).