ci: gate combined coverage against an 85% regression floor (Tier E)#333
Merged
Conversation
The coverage-report job now fails if the *combined* total drops below MIN_TOTAL_COVERAGE (85%), and writes a pass/fail gate line into the GitHub step summary. The threshold is enforced in the report script rather than via `[tool.coverage.report] fail_under`, because pytest-cov reads that key and each per-job `--cov` run measures only a slice of the package — a config-level fail_under would fail every partial run. Enforcing here gates the combined total only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Coverage series (follow-up to #325), final piece — a regression floor to protect the gains from the other PRs.
The
coverage-reportjob now fails if the combined total drops belowMIN_TOTAL_COVERAGE(85%), and writes a ✅/❌ gate line into the GitHub step summary alongside the existing total.Why enforce in the script, not
[tool.coverage.report] fail_underpytest-covreads thefail_underkey from the coverage config, and in the dispatch each test job runs--covover only a slice of the package (e.g. justtests/embedder/). A config-levelfail_underwould therefore fail every per-job partial run before the combine step ever happens. Enforcing in.ci/coverage_report.pygates the combined total only, which is the number we actually care about.Bump
MIN_TOTAL_COVERAGEas coverage climbs to ratchet the floor up.Scope
workflow_dispatch+coverage=true); it does not run on normal pushes/PRs, consistent with the dispatch-only coverage design.🤖 Generated with Claude Code