Repository navigation
fix(ci): pass --cov-fail-under=0 in parallel-tests buckets - #270
Conversation
The opt-in parallel-tests jobs (test-unit/test-integration/test-security, added in #269) each run pytest on their own marker slice on a separate runner. They inherit the caller's pyproject addopts, which commonly include a whole-suite --cov-fail-under. A bucket that exercises only part of the tree (e.g. security tests covering ~50%) then false-fails the whole-suite gate, even though combined coverage clears it. Pass --cov-fail-under=0 in all three bucket pytest invocations so the per-bucket runs never apply a whole-suite threshold. The real gate is unchanged: coverage-combine enforces coverage-threshold once, after merging the three .coverage.* files. The sequential quality-checks path is untouched (it accumulates coverage across steps in one job, so the threshold is correct there). Surfaced by cyo-adventure, the first real caller of the parallel-tests opt-in: its test-security bucket failed at 52.02% against the repo's 80% gate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 2 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 Run ID: 📒 Files selected for processing (3)
✨ 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
This pull request updates the reusable python-ci.yml workflow’s opt-in parallel-tests path so that each individual pytest bucket run (unit, integration, security) explicitly disables per-bucket coverage gating by passing --cov-fail-under=0. This prevents false failures when a caller configures a whole-suite --cov-fail-under in pyproject.toml addopts, while keeping the real coverage threshold enforcement unchanged in coverage-combine after merging coverage data.
Changes:
- Add
--cov-fail-under=0to thetest-unit,test-integration, andtest-securitypytest invocations, with explanatory inline comments. - Update
docs/workflows/python-ci.mdto document the per-bucket override and the post-merge enforcement behavior. - Add a changelog entry describing the fix and why it is needed for real-world callers using
parallel-tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/python-ci.yml |
Ensures per-bucket pytest runs never enforce whole-suite coverage thresholds, leaving enforcement to coverage-combine. |
docs/workflows/python-ci.md |
Documents the coverage gating behavior for parallel-tests callers and explains the --cov-fail-under=0 override. |
CHANGELOG.md |
Records the behavioral fix for parallel per-bucket jobs and clarifies the unchanged post-merge threshold enforcement. |



Summary
Follow-up to #269. The opt-in
parallel-testsjobs (test-unit,test-integration,test-security) each run pytest on their own marker slice on a separate runner, inheriting the caller'spyproject.tomladdopts. When those addopts include a whole-suite--cov-fail-under, a bucket that only exercises part of the tree false-fails the threshold, even though the combined coverage clears it.This passes
--cov-fail-under=0in all three bucket pytest invocations so per-bucket runs never apply a whole-suite gate. The real threshold is unchanged:coverage-combineenforcescoverage-thresholdonce, after merging the three.coverage.*files.Why
cyo-adventureis the first real caller of theparallel-testsopt-in. Itstest-securitybucket failed:The security marker covers ~52% of the tree on its own; the repo's
pyproject.tomlsets--cov-fail-under=80in[tool.pytest.ini_options] addopts, which the bucket inherited.Scope
quality-checkspath is deliberately untouched: it accumulates coverage across unit/integration/security steps in one job, so the whole-suite threshold is correct there.Testing
CI on this PR exercises the sequential path (this repo does not set
parallel-tests). The parallel path is validated by re-pinningcyo-adventure's caller to this PR's merge SHA and confirmingtest-security/coverage-combinego green with the same combined coverage percentage as a sequential run.Generated with Claude Code