Three testable meanings, one script, no browser and no mocks
(scripts/test/loki-loop-e2e.ts, run as the signed-in operator through the
same API the /loki page uses):
1. knows the fleet — a fleet-shaped question is answered from the studio map
(all three pillars named, fleet_map among the retrieved sources) and the
reply is an answer, not the model's plan for one;
2. publishes the map — /api/fleet/map is public with the pillars live, and
bitbaum's map.json is the same map, recently generated;
3. closes the loop (--dispatch) — a request typed into a thread comes back
into that thread as an outcome turn. A run that never returns is aborted
with a [loki-e2e] marker so no test leaves the operator's queue hanging.
Proven against production before commit: 3/3 without dispatch; with dispatch
and the builder unauthenticated, the loop failed honestly inside two minutes
with the runner's own diagnosis delivered into the thread.
Scheduled on the box every six hours (install-loki-e2e-watch.sh ->
loki-e2e-check.sh, alert on flip; the dispatch leg only when the builder-auth
probe last said ok). pnpm run test:e2e:loki runs it from a laptop.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>