Skip to content

feat(health): dependency checks in health endpoint - #158

Closed
ryzen-xp wants to merge 1 commit into
Creditra:mainfrom
ryzen-xp:feature/health-dependencies
Closed

feat(health): dependency checks in health endpoint#158
ryzen-xp wants to merge 1 commit into
Creditra:mainfrom
ryzen-xp:feature/health-dependencies

Conversation

@ryzen-xp

Copy link
Copy Markdown
Contributor

Description

Extends the /health endpoint to report dependency readiness (database ping, Horizon reachability) as requested in #101. To support fast-fail semantics alongside slower readiness checks, a new /health/live route has been introduced.

Changes

  • GET /health: Now acts as a readiness probe, checking Postgres and Stellar Horizon (with a 5s timeout) before returning a 200 or 503.
  • GET /health/live: Added as a pure, lightweight liveness probe (instant 200 ok).
  • Tests: Refactored existing integrations to use /health/live for liveness checks and added comprehensive coverage for health.ts (95.65% touched coverage).
  • Docs: Synchronized openapi.yaml and README.md to reflect the liveness vs readiness semantics.

Security/Ops Notes

  • Timeouts: The Horizon fetch includes an AbortController (5000ms) to prevent infinite hanging if the testnet is unreachable.
  • No PII, Auth tokens, or Stellar keys are exposed or logged by these probes.
Screenshot From 2026-03-28 09-50-00

Test output: 95.65% coverage on health.ts. Security/ops notes: Fast-fail liveness probe added at /health/live. Readiness probe at /health includes 5000ms timeout for Horizon fetch to prevent hanging. No PII or Stellar keys exposed.
@drips-wave

drips-wave Bot commented Mar 28, 2026

Copy link
Copy Markdown

@ryzen-xp Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ryzen-xp ryzen-xp closed this Mar 30, 2026
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.

Health check depth for database and Horizon

1 participant