Skip to content

fix(routes): separate liveness and readiness health checks with cached Soroban RPC probing - #75

Merged
joelpeace48-cell merged 1 commit into
FinesseStudioLab:mainfrom
xeseing:fix-health-readiness
Aug 27, 2026
Merged

joelpeace48-cell merged 1 commit into
FinesseStudioLab:mainfrom
xeseing:fix-health-readiness

Conversation

@xeseing

@xeseing xeseing commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What this changes?

Separates health checking into /health/live (process liveness) and /health/ready (dependency and shutdown readiness) endpoints, while maintaining /health for backward compatibility. Probes Soroban RPC health with a 3-second timeout and a 5-second TTL cache, returning 503 Service Unavailable with per-dependency breakdown if unhealthy or shutting down.

Closes #36

Why

The original /health route returned unconditional success, reporting healthy even when Soroban RPC was unreachable or during process shutdown. This could cause load balancers and orchestrators to route traffic to instances incapable of serving requests.

How it was verified

  • Executed npm run lint (tsc --noEmit) with 0 errors.

  • Executed npm run build (tsc) with 0 errors.

  • Executed unit test suite (npm test) covering liveness, readiness happy path, RPC caching within TTL, 503 on RPC failure/timeout, and 503 during graceful shutdown (63/63 tests passing).

  • Existing tests pass

  • New tests cover the change

  • No change to a public contract interface, or a migration note is included

Risk

Low. No changes to contract interfaces, stored state, or transaction signing. Only adds health endpoints (/health/live, /health/ready) and preserves existing /health behavior.

@joelpeace48-cell

Copy link
Copy Markdown
Contributor

@xeseing, don't create PR when not assigned issues

@joelpeace48-cell
joelpeace48-cell merged commit e6c1df7 into FinesseStudioLab:main Aug 27, 2026
1 check 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.

routes: /health does not check readiness

2 participants