Skip to content

feat: per-component health probes#574

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
AugistineCreates:task/health-probes
Jun 29, 2026
Merged

feat: per-component health probes#574
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
AugistineCreates:task/health-probes

Conversation

@AugistineCreates

@AugistineCreates AugistineCreates commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Closes #519


Description

This PR implements the /api/admin/health/probes and /api/admin/health/probes/:component endpoints for detailed per-component health checks in the admin panel.

Requirements & Context

  • Implemented GET /api/admin/health/probes to return the detailed status, response times, and error messages for all system components (api, database, and optional soroban_rpc, horizon).
  • Implemented GET /api/admin/health/probes/:component to allow querying individual components directly, returning 200 if healthy/degraded, 503 if down, 404 if the component is not configured, and 400 if the component name is invalid.
  • Stood up focused unit/integration tests covering all scenarios under src/routes/admin/health/probes.test.ts.
  • Integrated boundary input validation using Zod schemas via the validate middleware.
  • Included structured audit logging via logger.audit and correlation IDs.
  • Inherited the IP allowlist and admin authentication (adminAuth) middleware from the parent /api/admin router.

Verification

Automated Tests

Added tests covering:

  • Success and failure scenarios for both all-component and single-component probes.
  • Boundary input validation for component name parameters.
  • Verification of correct HTTP status codes (200, 400, 404, 503) under different component states.
  • Mocking of external dependencies (database pool and global fetch calls).

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@AugistineCreates 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

@greatest0fallt1me greatest0fallt1me merged commit 153ee5f into CalloraOrg:main Jun 29, 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.

Add /api/admin/health/probes for component checks

2 participants