Skip to content

V19: Add a /ready route to the built server - #692

Merged
LinuxDevil merged 1 commit into
mainfrom
v19-ready-route
Oct 20, 2026
Merged

LinuxDevil merged 1 commit into
mainfrom
v19-ready-route

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Fixes audit finding OPS-4 (Vercel competitor audit, 2026-10-19).

What was wrong

The built node server only had GET /health -> ok, so orchestrators could not tell "process is up" from "able to serve" (e.g. during a SIGTERM drain).

What changed

  • createDeployedServer answers GET /ready: 200 {"status":"ready"} while serving, 503 {"status":"draining"} once shutdown() has begun. No auth, no detail in the body, cache-control: no-store.
  • /health is unchanged (liveness); the generated Dockerfile HEALTHCHECK stays on /health.
  • No store check: AgentStore has no cheap ping, so it is skipped. The agent is loaded before the server listens, so "starting" is never observable.
  • Cloudflare Worker and lousho dev untouched (node-server/docker only; documented).
  • docs/deployment.md documents health vs ready; llms regenerated.

Tests

src/deploy/nodeServerReady.test.ts: 200 ready and /health still ok; no auth needed with LOUSHO_API_TOKEN set (while /chat still 401); 503 draining on a non-idle connection once shutdown starts. tsc, typecheck:tests, lint, test:coverage (6076 passed) and fallow all pass.

Changelog: The built node server and Docker image add GET /ready (200 ready, 503 draining during shutdown), separate from the /health liveness route.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LinuxDevil
LinuxDevil merged commit ac0018e into main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant