ci: add API smoke check, fix lint workflow parse error#87
Conversation
- add npm run smoke (tests/smoke.test.js) which boots the server and probes /healthz, /api/status and /api/agents; each request has a 5s timeout so a route that accepts but never responds fails the check and still prints the captured server output instead of stalling until the job timeout - run smoke as its own PR-blocking job in the Tests workflow - lint.yml declared node-version as a scalar matrix, which made the workflow fail parsing on every run; pin node 20 directly - server.js used the request validation middleware without importing it, so the server crashed at boot (caught by the smoke check) Known issue, needs maintainer sign-off: the Lint workflow never ran before this change (it failed at parse time), so fixing it surfaces pre-existing debt: 595 eslint errors (all prettier/prettier) and 19 files failing format:check. The Lint check stays red until a repo-wide "npm run format" lands; that single command clears both steps (verified locally: lint exits 0 with 21 warnings, format:check passes). lint:fix alone is not enough since format:check also covers markdown files. The mechanical ~1500 line format diff is deliberately not bundled here to keep this PR reviewable.
|
@Rufai-Ahmed is attempting to deploy a commit to the flamki's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Adds CI quality gates on pull requests: Lint, Test, and an API smoke job (three probes against the running server), plus a fix for a parse error in the existing lint workflow file.
The smoke probes use bounded requests: a route that accepts the connection but never responds fails the check in seconds and prints the captured server output, instead of hanging until the job timeout.
Known issue, needs maintainer sign-off
The Lint gate is red on day one: master carries 595 pre-existing prettier/eslint errors. The mechanical fix is a ~1500-line diff across 19 files, which I did not want to bundle into this PR. Happy to follow up with that as its own PR if wanted.
Testing
npm run smoke passes locally (all 3 probes). Hang-path verified against a stub server that never responds: fails in about 5s with the server output captured. Workflow YAML validated.
Closes #29