Skip to content

ci: gate combined coverage against an 85% regression floor (Tier E)#333

Merged
voorhs merged 1 commit into
devfrom
cov/coverage-gate
Jun 22, 2026
Merged

ci: gate combined coverage against an 85% regression floor (Tier E)#333
voorhs merged 1 commit into
devfrom
cov/coverage-gate

Conversation

@voorhs

@voorhs voorhs commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

What

Coverage series (follow-up to #325), final piece — a regression floor to protect the gains from the other PRs.

The coverage-report job now fails if the combined total drops below MIN_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_under

pytest-cov reads the fail_under key from the coverage config, and in the dispatch each test job runs --cov over only a slice of the package (e.g. just tests/embedder/). A config-level fail_under would therefore fail every per-job partial run before the combine step ever happens. Enforcing in .ci/coverage_report.py gates the combined total only, which is the number we actually care about.

Bump MIN_TOTAL_COVERAGE as coverage climbs to ratchet the floor up.

Scope

  • Only affects the manual coverage dispatch (workflow_dispatch + coverage=true); it does not run on normal pushes/PRs, consistent with the dispatch-only coverage design.

🤖 Generated with Claude Code

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>
@voorhs voorhs merged commit 9a23dca into dev Jun 22, 2026
19 checks passed
@voorhs voorhs deleted the cov/coverage-gate branch June 22, 2026 08:11
@voorhs voorhs mentioned this pull request Jun 22, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant