fix(ci): add vitest coverage thresholds to prevent silent regressions#655
fix(ci): add vitest coverage thresholds to prevent silent regressions#655hanthor wants to merge 1 commit into
Conversation
Without thresholds, coverage is collected but never enforced -- a PR that deletes tests still passes CI. Set conservative 50% floors across statements, branches, functions, and lines to start blocking regressions. Closes #651 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR enforces test coverage quality gates by adding minimum coverage thresholds (50%) to the Vite test configuration in ChangesTest Coverage Thresholds
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
hanthor
left a comment
There was a problem hiding this comment.
Code Review ✅
Changes: 1 file, +6 lines. vite.config.ts only.
Correctness
- ✅ Thresholds block is well-formed per Vitest coverage docs
- ✅ All four standard metrics covered (statements, branches, functions, lines)
- ✅ 50% is conservative and safe — won't break existing CI
Closes #651
- ✅ Addresses the quality finding exactly as specified
Verdict
Simple, correct, minimal. LGTM.
hanthor
left a comment
There was a problem hiding this comment.
Review: PR #655 — add vitest coverage thresholds
Minimal, correct fix for #651. Adds coverage thresholds to vitest config.
What's good
- 50% across all metrics is a reasonable floor — prevents zero-coverage regressions without blocking incremental work
- Single file, config-only change
v8provider + lcov reporter already configured, this just adds the gate layer
Verdict
LGTM. Ready to merge.
Summary
Closes #651
vite.config.tsreports coverage via @vitest/coverage-v8 but has nothresholdsblock, so PRs that delete tests still pass CI.Adds conservative 50% floors across statements, branches, functions, and lines. These can be raised progressively as coverage improves.
Changes
vite.config.ts: addthresholdsblock to thecoverageconfigTest plan
npm run test -- --coverageand confirm it fails if coverage drops below 50%Summary by CodeRabbit