Files
loki/scripts/hetzner
CatoandClaude Fable 5.1 24c21ddf9c feat(ops): the cloud builder's liveness is public, deploys print its state, the queue says "offline" (#1158)
* feat(ops): the cloud builder's liveness is public, deploys print its state, the queue says "offline"

The shared cloud builder was offline all night on 2026-10-11 → 12 and
nothing outside a signed-in page said so: /api/health reported the web
app green, the fleet sweep probes only HTTP codes, and the box journal is
the one place the restart's outcome is written. The owner found out by
trying to work from a second computer.

- GET /api/health/builder: 200 while the owner's cloud builder is
  connected and heartbeating, 503 otherwise, with the last heartbeat and
  version. Public on purpose (one boolean, one timestamp, about a service
  the operator runs); registered in scripts/test/api-route-auth.ts.
- install-watchdog.sh: the box watchdog now probes it, so a state flip
  alerts on Telegram like a dead site does.
- deploy-hetzner.sh: before scheduling the runner restart, print
  `systemctl is-active loki-box-runner`, the last runner journal lines and
  the last drain lines into the CI log — the first place a person without
  an ssh session can read why the builder is down. Warn-only.
- feedback run-step: a job on the cloud queue while the cloud builder is
  offline reads "Cloud builder offline — nothing starts until it
  reconnects", not "Watch shows why" (nothing showed why).

Tests: feedback-run-step (+2), api-route-auth, watchdog-check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB

* fix(terminal): a private cloud builder reads "private", not "offline"

Walking Loki as a brand-new account (2026-10-12): the Terminal's chip said
"Cloud builder offline" beside an empty state that said "Cloud builder is
private for this account". Presence is per account and a new account has
none, so the chip mistook "not yours" for "down". The chip derivation moves
into terminalHonesty() (one helper, the component stays under its 510-line
ratchet) and names the gate first.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 03:42:08 -07:00
..