Repository navigation
ci(#17): code coverage measurement + ratchet gate (baseline 57.31%) - #64
Conversation
…ine + CI artifact Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 9 minutes. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 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 |
There was a problem hiding this comment.
Pull request overview
Adds opt-in code coverage measurement and a “ratchet” gate to the PowerShell build entrypoint so CI enforces that overall coverage does not regress beyond a small tolerance, while also publishing the JaCoCo coverage report as a CI artifact.
Changes:
- Introduces a committed
coverage-baseline.json(overall + per-module baseline map) used by the coverage ratchet gate. - Extends
build.ps1with a-Coverageswitch to enable Pester JaCoCo collection and enforce the baseline/tolerance gate. - Updates CI to run coverage mode and upload
coverage.xml, and documents the workflow in CONTRIBUTING.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| coverage-baseline.json | Adds the committed baseline (overall + per-module) used by the coverage ratchet gate. |
| build.ps1 | Adds opt-in Pester JaCoCo coverage collection and a baseline/tolerance “ratchet” failure gate. |
| .gitignore | Ensures coverage outputs stay ignored while explicitly tracking coverage-baseline.json. |
| .github/workflows/ci.yml | Runs build.ps1 with coverage enabled and uploads coverage.xml as an artifact. |
| .github/CONTRIBUTING.md | Documents how the coverage gate works and how to raise the baseline deliberately. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| param( | ||
| [switch]$InstallDeps, | ||
| [string[]]$ExcludeTag = @('E2E', 'Integration') | ||
| [string[]]$ExcludeTag = @('E2E', 'Integration'), | ||
| [switch]$Coverage |
… tolerance; -CodeCoverage alias; doc fixes (8-lens) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| # per-module floor. Measured run-to-run jitter is ~0.02pt, so 0.3pt is ~15x the noise -- wide | ||
| # enough to ride out that jitter, tight enough that real erosion (a function/test removed) trips | ||
| # it promptly. Named constant: change it here, in one place, for both gates. | ||
| $coverageTolerance = 0.30 |
Implements #17 — code coverage measurement + a hardened ratchet gate in
build.ps1.Baseline
57.31% overall (1199 tests), measured from the real suite via Pester JaCoCo — up from 33.2%.
coverage-baseline.jsonholds overall + a 16-module per-module map.How it works (Gate 3, opt-in
-Coverage/-CodeCoverage)baseline.overallbelow 50% fails as gutted/tampered, so the baseline can't be edited down to defeat the gate.ratchet: baseline can be raisedhint (never auto-raises). Reuses the singleInvoke-Pesterrun (+~14s for instrumentation). CI uploadscoverage.xml; CONTRIBUTING documents the per-module raise process.Proof
Per-module gate: raised VSSManager's baseline → build failed naming it while overall passed. Absolute floor:
baseline.overall=5→ failed "implausible/tampered". Plain./build.ps1stays BUILD OK with the gate skipped.Closes #17.
🤖 Generated with Claude Code