Skip to content

feat(health): validate query params, paginate deep checks, document API - #407

Merged
mikewheeleer merged 2 commits into
Agentpay-Org:mainfrom
thlpkee20-wq:feature/health-01-group
Jul 28, 2026
Merged

feat(health): validate query params, paginate deep checks, document API#407
mikewheeleer merged 2 commits into
Agentpay-Org:mainfrom
thlpkee20-wq:feature/health-01-group

Conversation

@thlpkee20-wq

Copy link
Copy Markdown
Contributor

Summary

Closes #400
Closes #399
Closes #398
Closes #397

Covers the full health group of GrantFox campaign issues:

Test plan

  • npm run build
  • npm run lint
  • npm test — ran the full suite plus targeted runs of
    health.test.js, health-deep.test.js, readiness.test.js,
    routes/operational.test.js, openapi-routes.test.js,
    middleware.test.js, query-params.test.js,
    schema-validation.test.js: all passing, 0 failures.

Note

This branch is stacked on #406 (fix/package-json-merge-conflict), which
resolves the unresolved merge-conflict markers currently on main that
break npm install. That PR's commit will show in this diff until it
merges; the actual health-group change is the four files under docs/
and src/.

The pr-404 merge left literal <<<<<<</=======/>>>>>>> markers in
devDependencies, producing invalid JSON and breaking npm install for
every contributor. Resolves to typescript@^6.0.3 with
typescript-eslint@^8.65.0: the currently published typescript-eslint
(8.65.0) only supports typescript <6.1.0, so pairing it with the
typescript@^7.0.2 side of the conflict leaves the dependency tree
unresolvable.
- Reject unknown query parameters on /health, /api/v1/health/ready, and
  /api/v1/health/deep with a structured 400 invalid_request.
- Add a checks array to /api/v1/health/deep exposing per-subsystem status
  (event log, usage/services/webhook/API-key stores, memory), with
  opaque-cursor pagination (limit default 10, max 50) matching the
  existing events-log cursor contract.
- Add docs/health.md covering all three routes, the new pagination
  contract, and error codes.
- Add src/health-deep.test.ts covering success, pagination, malformed
  cursor, and unknown-query-param rejection.
@mikewheeleer

Copy link
Copy Markdown
Contributor

@thlpkee20-wq clean implementation, merging with thanks 🙌

@mikewheeleer
mikewheeleer merged commit b28e2fb into Agentpay-Org:main Jul 28, 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

2 participants