From a803694582059fa37cd76a1226ab55259f41a0e5 Mon Sep 17 00:00:00 2001 From: t Date: Sun, 15 Nov 2026 16:14:37 -0400 Subject: [PATCH] window-run: the deferred line named a timestamp, not the holder (and the states it writes now have a table) Measured against a live token rather than a fixture: $ cat ~/GPU-TOKEN gpu-hold cl-hrxkern mtp-bisect wall pid 1743670 2026-11-15T16:08:40-04:00 $ awk '{print $NF}' ~/GPU-TOKEN 2026-11-15T16:08:40-04:00 so the merged deferred line told a lane 'gpu held by 2026-11-15T16:08:40-04:00'. The label is everything between 'gpu-hold' and ' pid N' -- and labels contain spaces, which is why neither $2 nor $NF is the answer. The arm could not see it because its fixture predates that format: 'gpu-hold cl-other 999999' has the pid last, so $NF happened to be right. The new arm uses the shape gpu-hold actually writes, labels with spaces and ISO stamp included, and asserts both the positive (the label and its pid appear) and the negative (no 'gpu held by 20\d\d-' ever appears) -- the negative is the one that catches this class. - parser: label = strip 'gpu-hold ' and ' pid N ...' ; pid = the digits after ' pid '. The legacy two-field shape still parses, as label plus pid in one word. - docs/ci-runners.md: the four tokens a window can end with (queued / deferred / asleep-no-demand / FAILED), what each meant, and what to do -- three of the four are silent on purpose, so a silent :8090 is not evidence of a failed restart on its own. The page had the queued contract in prose but none of the tokens the code actually writes. self-test: ok. Mutation (restore $NF): 3 red, incl. '... and never the timestamp the token ends with (got 1, want 0)'. pre-pr-checks: 11 green, 1 skipped. --- docs/ci-runners.md | 15 +++++++++++++++ scripts/window-run.sh | 25 ++++++++++++++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/docs/ci-runners.md b/docs/ci-runners.md index 8dc5f4ef5..dd5864c74 100644 --- a/docs/ci-runners.md +++ b/docs/ci-runners.md @@ -304,6 +304,21 @@ the model ticketed, a memory window no longer needs to stop it: it is not reside Stopping it would only drop its queued ticket. That happened on 2026-11-15 at 10:00Z, when a window stopped the just-switched unit and its place in the queue was lost. +**Read the window's end line before believing a restart failed.** `scripts/window-run.sh` ends every window with one +`end` line in `~/briefs/WINDOWS.log`, and the state it names decides whether anything is wrong. Four tokens, four +meanings — only the last is a fault: + +| the line says | what was true when the window ended | what to do | +|---|---|---| +| `restart=queued(WAITING for a GPU ticket when this window ended, not restored)` | `coder-llm` is ticketed and waiting behind other tickets: `systemctl start` means *queued*, so `:8090` is silent **by design** | nothing; it answers when its ticket is granted | +| `restart=deferred(gpu held by