Problem
Once a server is registered, there's no periodic check that it's still alive, still has a valid OpenAPI spec, or still responds with 402 challenges. Servers could go offline and remain listed indefinitely.
Solution
Add a cron job that periodically re-validates registered servers.
Checks to run
Behavior
- Run daily (or every 6 hours)
- On failure: set
server.status = 'unreachable' after N consecutive failures
- On recovery: automatically restore to
active
- Update
server.endpointData if endpoints changed
- Log validation results for debugging
Implementation
- Next.js API route:
POST /api/cron/revalidate
- Protected by
CRON_SECRET (same pattern as other crons)
- Uses
@suimpp/discovery check internally
Context
Deferred from Phase 4 scope. Currently servers are validated once at registration and never rechecked.
Problem
Once a server is registered, there's no periodic check that it's still alive, still has a valid OpenAPI spec, or still responds with 402 challenges. Servers could go offline and remain listed indefinitely.
Solution
Add a cron job that periodically re-validates registered servers.
Checks to run
/openapi.jsonstill exists and parses correctlyBehavior
server.status = 'unreachable'after N consecutive failuresactiveserver.endpointDataif endpoints changedImplementation
POST /api/cron/revalidateCRON_SECRET(same pattern as other crons)@suimpp/discoverycheck internallyContext
Deferred from Phase 4 scope. Currently servers are validated once at registration and never rechecked.