| Area | Pass | Fail / Blocked |
|---|---|---|
| MongoDB & models | 4 | 0 |
| API core | 5 | 0 |
| OAuth & webhooks | 4 | 0 |
| Worker & sync | 1 | 4 |
| Total | 14 | 4 |
| Checkpoint | Result | Evidence |
|---|---|---|
| User record in database after OAuth | Pass | 1 user in Atlas (6a3f6ab4762ec881f603435d) |
| Each model imports cleanly | Pass | User, Repository, Commit, PullRequest, Review all OK |
User.findOne() without throwing |
Pass | Returned user document |
| Checkpoint | Result | Evidence |
|---|---|---|
GET /health → {"status":"ok"} |
Pass | HTTP 200 |
/api/metrics/commits no token → 401 |
Pass | HTTP 401, {"error":"Unauthorized"} |
Valid JWT → data or [] |
Pass | HTTP 200, [] |
| Throwing route → structured JSON error | Pass | HTTP 500, {"error":"Test failure"} via errorHandler |
| Missing env var before listen | Pass | MONGODB_URI= node src/index.js → Missing required env var: MONGODB_URI |
| Frontend loads | Pass | http://localhost:5173 → HTTP 200 |
| Checkpoint | Result | Evidence |
|---|---|---|
| OAuth flow (GitHub → callback → DB user) | Pass | 1 user in DB; prior sessions showed GET /api/auth/github/callback 302 |
| Webhook missing/invalid signature → 401 | Pass | Both returned 401 |
| Webhook valid HMAC → 202 | Pass | HTTP 202, {"queued":true} (with X-GitHub-Event: ping) |
JWT userId matches Mongo _id |
Pass | Signed/verified payload matches 6a3f6ab4762ec881f603435d |
| Checkpoint | Result | Evidence |
|---|---|---|
npm run worker starts without error |
Pass | Worker started and listening for jobs... |
POST /api/repos creates DB record |
Pass | Repos went 1 → 2 (octocat/Hello-World added) |
| POST enqueues job & returns 201 | Fail | Request hangs on syncQueue.add() (Redis ECONNRESET) |
| Worker picks up and processes job | Fail | Redis broken — no Processing job: logs |
commits / pull_requests have GitHub data |
Fail | 0 commits, 0 PRs in Atlas |
| Failed sync retries 3× with backoff | Fail | Can't test until Redis works |