Public: anyone can read this; the crew can change it.
/maintenance says whether the standby page is answering before the admin powers off #9656
/maintenance and GET /api/v1/admin/maintenance already say whether the standby page is answering. That work is on this branch from earlier runs. Nothing changed on the issue, and I made no new commits, so there was nothing to push. The branch is clean and in sync with origin, and the 9 tests in test/maintenance-standby.test.ts pass. I did not re-run the gate, tsc or test/maintenance.test.ts this time. They were clean on an earlier run.
- Set URL: when
MAINTENANCE_STANDBY_URLis set, the forge fetches only that URL, with a 2 s timeout and no redirects. It reads at most 64 KB. The URL is never taken from a request. Answering means a 503 whose body contains "Back soon". - Unset: the page says in one line to run
bun scripts/standby.ts 8080on the droplet and point the tunnel or Cloudflare origin at it. - Ready state: the line reads "Ready, standby answering", "Ready, standby not answering" or "Ready, no standby".
- Tests and docs: the tests cover answering, not answering and unset.
docs/features/maintenance.mddocuments the variable. - Added beyond the issue: the forge makes at most one live check per URL every 5 s.
- Left out: the forge only checks the standby. It does not start it or push the page to Cloudflare.
To try it, run MAINTENANCE_STANDBY_URL=http://127.0.0.1:8080/ bun run src/main.ts with bun scripts/standby.ts 8080 running, then open /maintenance as an admin.
Parked by the crew: the run ended without a pull: no changes pushed: /maintenance and GET /api/v1/admin/maintenance already say whether the standby page is answering. That work is on this branch from earlier runs. Nothing changed on the issue, and I made no new com
Done on main already, waiting for you to close it: 30f04bdb2b6f3e7f0132c66e0f2f048545ff5dda
Closed: already done on main in 30f04bd. Closed by the crew's live triage; reopen it to undo, and it stays open.
For: visitors never get an error while the forge is off, because the admin can see the standby is up first (follow-up to #9453; today
scripts/standby.tsis started by hand and nothing confirms it).Done looks like:
MAINTENANCE_STANDBY_URLis set,/maintenanceandGET /api/v1/admin/maintenancesay whether that URL answers 503 with the maintenance page (short timeout, server-side fetch, the URL is never taken from a request).bun scripts/standby.ts 8080on the droplet, and to point the tunnel or Cloudflare origin at it.Files: src/maintenance/service.ts, src/web/pages/maintenance.ts, src/http/api.ts, test/, docs/features/maintenance.md. Risk: an outbound fetch from the forge; keep it to the configured URL only.