Skip to content

Add check runner: HTTP checker and cron API route - #16

Merged
jasoncrawford merged 1 commit into
mainfrom
check-runner
Feb 18, 2026
Merged

jasoncrawford merged 1 commit into
mainfrom
check-runner

Conversation

@jasoncrawford

Copy link
Copy Markdown
Collaborator

Summary

  • Adds src/lib/checker.ts — HTTP checking function with 30s timeout, redirect following, and error categorization
  • Adds src/app/api/checks/run/route.ts — POST endpoint gated by CRON_SECRET, fetches all sites, checks each concurrently, records check results, and opens incidents for new failures
  • Adds vercel.json with */5 * * * * cron schedule
  • Adds comprehensive unit tests for both the checker module (5 tests) and the route handler (4 tests)
  • Updates vitest.config.ts with @ path alias

Test plan

  • All 15 Vitest tests pass (including 9 new tests)
  • Next.js build succeeds with no type errors
  • CI passes on this PR

Closes #7

🤖 Generated with Claude Code

Implements the monitoring heartbeat that checks all sites every 5 minutes
via Vercel Cron. Includes the HTTP checker module (with timeout handling),
the /api/checks/run POST endpoint (auth-gated, records checks, opens
incidents on failure), vercel.json cron config, and comprehensive unit tests.

Closes #7

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford
jasoncrawford merged commit 041cb47 into main Feb 18, 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.

Build the check runner (cron endpoint)

1 participant