ci: move the coverage gate out of addopts into the CI step - #5
Conversation
--cov-fail-under in pyproject addopts applies to every pytest
invocation, not just full runs. A targeted command such as
pytest tests/test_assessor.py -v
measures the whole package while executing one file, so it reports a few
percent coverage and exits non-zero even though every selected test
passed, making the documented developer workflow unusable.
The gate moves to the workflow pytest step: CI still enforces 100% on
the full suite, targeted runs behave again. Verified both directions.
There was a problem hiding this comment.
t0kubetsu has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Warning Review limit reached
Next review available in: 18 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: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Comment |
The coverage threshold moved to the CI pytest step in this branch, so the 'enforced via pyproject.toml addopts' line is no longer accurate.
There was a problem hiding this comment.
t0kubetsu has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
The problem
--cov-fail-under=100sits inpyproject.tomladdopts, so it applies to every pytest invocation — not just full runs.Running a single test file measures the whole package while executing one file. Coverage lands in the low single digits, the gate fails, and pytest exits non-zero even though every selected test passed. Demonstrated on a sibling repo before making the change:
The fix
Move the threshold to the workflow's pytest step. CI still enforces 100% on the full suite; targeted runs stop failing.
Verified
pytest tests/test_assessor.pynow exits 0 (11 passed); the full run still reportsRequired test coverage of 100% reached.Scope
Sixth and last of six repos with this defect, all fixed identically. Raised by Greptile on chainvalidator#7, which is the reference shape.