Skip to content

feat: complete health/sync status endpoints with rate limit and degraded test (#16)#27

Merged
Tristan578 merged 1 commit intomainfrom
fix/issue-16-remaining
Mar 15, 2026
Merged

feat: complete health/sync status endpoints with rate limit and degraded test (#16)#27
Tristan578 merged 1 commit intomainfrom
fix/issue-16-remaining

Conversation

@Tristan578
Copy link
Copy Markdown
Owner

Summary

Closes the remaining acceptance criteria from #16:

  • Rate limit in sync status: GET /api/sync/status now includes rateLimit object (remaining/limit/resetAt) when GitHub API has been contacted
  • Degraded health test: TestServer_HealthCheck_Degraded verifies 503 response with status: "degraded" when DB is unreachable

All 7 acceptance criteria from #16 are now met.

Closes #16

Test plan

  • TestServer_HealthCheck (200 ok)
  • TestServer_HealthCheck_Degraded (503 degraded)
  • TestServer_SyncStatus (pending jobs)
  • Full go test ./... passes

…raded health test

- Store last-seen GitHub rate limit info (remaining/limit/resetAt)
  from every API response via thread-safe package-level state
- Expose rate limit in GET /api/sync/status when available
- Add TestServer_HealthCheck_Degraded: verifies 503 + degraded
  status when DB is unreachable
@Tristan578 Tristan578 merged commit db0b816 into main Mar 15, 2026
5 checks 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.

Add health check endpoint and sync status visibility

1 participant