chore: hold the coverage gate at 100% - #79
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the project’s test coverage enforcement by raising the coverage fail-under threshold to match the repo’s current 100% coverage, and updates related documentation comments to reflect how the gate is configured.
Changes:
- Set
COVERAGE_FAIL_UNDER = 100in the rootMakefileso the Rhizapython.mkcoverage gate enforces 100%. - Updated
pyproject.tomlcommentary to reflect the gate source (COVERAGE_FAIL_UNDER) and the current module count.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Makefile | Overrides template default coverage threshold to enforce 100% coverage. |
| pyproject.toml | Updates explanatory comments about how coverage/test-layout expectations are enforced. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+168
to
+170
| # provided here by the coverage gate instead, which the root Makefile sets to 100% | ||
| # via COVERAGE_FAIL_UNDER, and which the suite meets at 100% of statements *and* | ||
| # branches across all ten modules -- a stronger check than the presence of a file |
Comment on lines
+11
to
+14
| # python.mk defaults COVERAGE_FAIL_UNDER to 90. That is a sensible floor for a repo | ||
| # climbing towards coverage; here it is ten points of silent regression, because all | ||
| # 607 statements and 166 branches across the ten modules are covered today. A gate | ||
| # below the actual number does not measure anything -- it only says when to panic. |
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.
Coverage is already 100%, so this raises the gate to match it. No tests were added,
because there is nothing uncovered to add them for.
The change
python.mkdefaultsCOVERAGE_FAIL_UNDERto 90. That is the right floor for a repoclimbing towards coverage; here it permitted ten points of silent regression. The root
Makefile— repo-owned, and already whereMKDOCS_EXTRA_PACKAGES,LICENSE_IGNORE_PACKAGESand themutationoverride live — now sets it to 100.Placed before
include .rhiza/rhiza.mk, so python.mk's?=sees it already defined,and written as
=rather than?=for the reason theLICENSE_IGNORE_PACKAGESblockdirectly below documents: a
?=against a variable the template already defines is asilent no-op.
Verified — pytest-cov's summary line changes from
Required test coverage of 90% reachedto
Required test coverage of 100% reached, which is what proves the override actuallyreaches the flag.
No workflow passes
COVERAGE_FAIL_UNDERon the command line, so nothing overrides thisin CI.
Also corrected
A comment in
pyproject.tomlclaimed the gate was "90%", set bypytest.ini, over "allthree modules". All three parts were wrong: it is set via
COVERAGE_FAIL_UNDER(notpytest.ini), it is now 100, and the package has been ten modules for a while.What this does and does not buy
It is a ratchet against untested code arriving — nothing more. Line-and-branch coverage
says every line ran, not that any assertion would have noticed if it misbehaved.
make mutationis the gate that asks the second question, and it remains the more informativeone for a numerical package.
🤖 Generated with Claude Code