Skip to content

feat(runtime): add GET /ready readiness probe for graceful rolling restarts - #2217

Merged
xuyushun441-sys merged 1 commit into
mainfrom
seam/ready-endpoint
Jun 22, 2026
Merged

feat(runtime): add GET /ready readiness probe for graceful rolling restarts#2217
xuyushun441-sys merged 1 commit into
mainfrom
seam/ready-endpoint

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Why

The dispatcher exposed only /health (always 200). Multi-replica deployments need a readiness signal distinct from liveness: a load balancer must stop routing to a replica before its in-flight requests are force-closed on shutdown, and must not route to a replica that is still booting.

What

  • GET /ready200 only when kernel.getState() === 'running'; 503 while booting (idle/initializing) or shutting down (stopping/stopped).
  • Added /ready to the membership-skip paths (like /health) so it's reachable without auth/environment scoping.
  • Pairs with the existing in-flight drain in HonoHttpServer.close() (P1-3): /ready 503 → LB drains → in-flight finish → close.
  • Unit test added (200 running / 503 booting+stopping). Verified locally: strict DTS build of @objectstack/runtime + tests green.

Scope

Generic open-core production-hygiene mechanism (benefits any deployment, single- or multi-node). No cluster dependency. Part of the multi-node readiness groundwork (cloud ADR-0018).

🤖 Generated with Claude Code

…starts
The dispatcher exposed only /health (always 200). Multi-replica deployments
need a readiness signal so a load balancer drains a replica before its
in-flight requests are force-closed on shutdown. /ready returns 200 only when
the kernel state is 'running'; 503 while booting (idle/initializing) or
shutting down (stopping/stopped). Added to the membership-skip paths like
/health so it is reachable without auth/environment scoping.
Pairs with the existing in-flight drain in HonoHttpServer.close() (P1-3).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercelBot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJun 22, 2026 3:10pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/runtime.

17 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/cloud-artifact-api.mdx(via packages/runtime)
  • content/docs/concepts/implementation-status.mdx(via @objectstack/runtime)
  • content/docs/concepts/north-star.mdx(via packages/runtime)
  • content/docs/concepts/packages.mdx(via @objectstack/runtime)
  • content/docs/guides/api-reference.mdx(via @objectstack/runtime)
  • content/docs/guides/authentication.mdx(via @objectstack/runtime)
  • content/docs/guides/cloud-deployment.mdx(via @objectstack/runtime)
  • content/docs/guides/deployment-vercel.mdx(via @objectstack/runtime)
  • content/docs/guides/driver-configuration.mdx(via @objectstack/runtime)
  • content/docs/guides/hook-bodies.mdx(via @objectstack/runtime)
  • content/docs/guides/packages.mdx(via @objectstack/runtime)
  • content/docs/guides/plugin-chatbot-integration.mdx(via @objectstack/runtime)
  • content/docs/guides/production-readiness.mdx(via @objectstack/runtime)
  • content/docs/guides/single-project-mode.mdx(via @objectstack/runtime)
  • content/docs/protocol/objectos/http-protocol.mdx(via @objectstack/runtime)
  • content/docs/protocol/objectos/index.mdx(via @objectstack/runtime)
  • content/docs/protocol/objectos/lifecycle.mdx(via @objectstack/runtime)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@xuyushun441-sys
xuyushun441-sys merged commit 7af0048 into mainJun 22, 2026
16 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the seam/ready-endpoint branch June 22, 2026 15:17
os-zhuang added a commit that referenced this pull request Jul 16, 2026
…the handler (#2995)
handlePackages has handled `PATCH /packages/:id` (edit a package's name /
description / version) all along, but the route was never mounted in
dispatcher-plugin — only GET/DELETE `/:id` and PATCH `/:id/enable|disable`
were. So `PATCH /packages/:id` 405'd over HTTP and the Studio "edit package"
form silently failed (surfaced dogfooding the builder header refresh).
Register the missing route, mirroring the GET/DELETE `/:id` handlers. `/:id`
is a single path segment, so it does not shadow the `/:id/enable|disable`
routes. Adds a route-registration regression test (same class as the /ready
seam bug, #2217).
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@xuyushun441-sys@os-zhuang