feat: detect oxlint and bun test gates in CI workflows - #532
Conversation
Bun projects commonly run lint via oxlint and tests via `bun run test` or `bunx vitest`. The lint/test gates previously only matched eslint/ruff/black/... and npm/yarn test, so a fully-gated Bun CI pipeline scored 0 for the test gate and missed oxlint entirely. - Add oxlint to lint gate patterns. - Add `bun run test` to test gate patterns. - Add unit test covering a Bun workflow (setup-bun + frozen install + oxlint-style lint + bun test + bunx tsc).
📝 WalkthroughWalkthroughThe CI quality-gate assessor now recognizes ChangesCI quality-gate detection
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/unit/test_assessors_testing.py`:
- Line 579: Update the test fixture in the assessor test to include the
repository-supported lint command containing “oxlint,” rather than relying only
on “bun run lint.” Keep “bun run test” in the steps so the test exercises both
detection patterns and would fail if the oxlint alternative were removed.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2e40bc10-3a9a-4db0-bf0d-37de815e1c24
📒 Files selected for processing (2)
src/agentready/assessors/testing.pytests/unit/test_assessors_testing.py
| " steps:\n" | ||
| " - uses: oven-sh/setup-bun@v2\n" | ||
| " - run: bun install --frozen-lockfile\n" | ||
| " - run: bun run lint\n" |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Exercise the new oxlint detection.
bun run lint matches the existing \blint\b pattern. This test therefore passes even if the new oxlint alternative is removed. Replace or supplement this step with the repository’s supported command containing oxlint, while keeping bun run test to cover both new patterns.
As per path instructions, tests must verify the intended behavior and missing edge cases.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/unit/test_assessors_testing.py` at line 579, Update the test fixture in
the assessor test to include the repository-supported lint command containing
“oxlint,” rather than relying only on “bun run lint.” Keep “bun run test” in the
steps so the test exercises both detection patterns and would fail if the oxlint
alternative were removed.
Source: Path instructions
Description
The CI Quality Gates assessor did not recognize two very common commands in Bun-based projects:
bun run test— the test gate matched npm/yarn-style invocations but not Bun'sbun run test.A Bun project with all three gates in CI (lint + test + typecheck, PR-triggered) scored
failwith a 20/30 gate score.Type of Change
Related Issues
No related issues (no existing Bun-support issue found; see sibling PRs #531, #533, #534).
Changes Made
lint_patterns: addoxlint.test_patterns: addbun run test.test_bun_workflow_passes: a workflow usingoven-sh/setup-bun,bun install --frozen-lockfile, lint,bun run testandbunx tsc@7 --noEmitnow passes.Testing
pytest) — 23 passed (CI assessor suite), 178 totalChecklist
Additional Notes
Next.js 16, Vercel and a large share of new TS projects use Bun as their package manager; CI pipelines built around it should not be penalized for using its native commands.