Repository navigation
feat: add sync status API endpoints for monitoring - #29
Merged
Merged
Conversation
Add /sync/status, /sync/trigger, and /sync/health endpoints: - GET /sync/status: Full sync status with GitHub/papers counts, scheduler info, health - POST /sync/trigger: Manual sync trigger (requires API key) - GET /sync/health: Simple health check for monitoring (returns 503 if unhealthy) Also: - Add OSC domains to CORS origins for status page integration - Add tests for all sync endpoints Closes #27
Tests now work regardless of auth configuration by: - Using BYOK headers to bypass server auth - Testing validation behavior rather than specific auth responses - Accepting multiple valid status codes based on environment
- Add RequireAdminAuth dependency (BYOK bypass not allowed for admin endpoints) - Remove database_path from public /sync/status response - Update health check to treat new installations as healthy (grace period) - Fix tests to use @pytest.mark.usefixtures for db isolation
This was referenced Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add API endpoints for monitoring knowledge sync status, enabling status pages and health checks.
New Endpoints
/sync/status/sync/trigger/sync/healthExample Response (
GET /sync/status){ "github": { "total_items": 1516, "issues": 233, "prs": 1283, "open_items": 29, "repos": { "hed-standard/hed-specification": {"items": 587, "last_sync": "2026-01-14T..."} } }, "papers": {...}, "scheduler": { "enabled": true, "running": true, "github_cron": "0 2 * * *", "next_github_sync": "2026-01-15T02:00:00Z" }, "health": { "healthy": true, "github_age_hours": 23.5 } }Also Included
Test Plan
Closes #27