Files
loki/.github
CatoandClaude Opus 5.5 071e0ddbe9 fix(runner): a day-old Claude with no status file no longer holds every runner update (#1310)
* feat(previews): a status mode that says where a change sent with `ask` is

An ask to a preview's builder answers with a runId and a commandId, and
nothing could read them back from Actions: a change that had not landed after
half an hour was waiting, running or failed, and there was no way to tell.
`status` reads the run (and the queued command) through the deployed app as
the operator, the same way the other modes act.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1

* feat(previews): status also says whether the cloud builder is running and what its update drain last did

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1

* feat(previews): status shows the runner restart's state and each agent the drain waits on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1

* fix(runner): a day-old Claude with no status file no longer holds every runner update

The drain restarts the box runner only when no agent is working, and a Claude
with no status file counts as working ("unknown is not idle"). Two such
processes, 6 days and 1.8 days old, held the drain open while all six other
agents sat idle: the runner stayed on 12 October's code, and since the
commands route holds new work for a builder that is behind
(src/lib/runner-update-hold.ts), no new task started on the cloud builder
at all. Center SOM's change sat "Waiting for a builder" for over half an hour,
and so did everything else.

Every current Claude writes its status file for as long as it runs, so one
that has written none for a day (LOKI_RUNNER_LEFTOVER_SECS, default 86400) is a
leftover — a session from a CLI that predates the file, or a helper — and no
longer holds the restart. A young one with no file, a Claude whose file says it
is working, and every other agent CLI are still busy. Pinned in
test-drain-and-restart-runner.sh.

Also on this branch: previews.yml `status` (a run's state, the queued command,
the runner, its drain and each agent's status — names and states only), which
is how this was found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 18:27:22 +02:00
..