Enforce the coverage level already achieved - #112
Merged
Conversation
Coverage ran on every CI build and failed on nothing: [tool.coverage.report] set only show_missing, so a drop was reported and ignored. The bar had already been cleared -- 1441 statements, 3 missed -- it just was not held. Gate at 98 rather than at the current 99.79%: a legitimately unreachable branch should not fail CI, but ~26 statements of slack is far too little to let coverage quietly erode. Verified both directions -- the suite passes at 98 and fails at 100, so the setting is read and enforced rather than silently ignored. Closes#79 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QJnVMNGwTRDktC4rkABtgt
Uh oh!
There was an error while loading. Please reload this page.
Closed
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 freeto 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.
Summary
Closes#79.
Coverage ran on every CI build and failed on nothing.
[tool.coverage.report]set onlyshow_missing, so a drop was reportedand then ignored. The bar had already been cleared — 1441 statements,
3 missed, 99.79% — it just was not held.
What's included
pyproject.toml—fail_under = 98under[tool.coverage.report],with a comment recording what the current figure is and why the gate
sits below it.
CHANGELOG.md— entry under## [Unreleased]→### Development.Why 98 and not 100
The only three uncovered statements are
Packet.__repr__and the__eq__NotImplementedbranch. Both are trivially coverable, so 100was tempting — but a gate at 100 turns every legitimately unreachable
branch into a CI failure and invites
# pragma: no coverscatteredthrough the source to keep it green. 98 leaves roughly 26 statements of
slack against 1441: enough for a defensive branch, far too little for
coverage to erode quietly.
95, the other value the issue floated, allows ~72 uncovered statements.
That is more slack than this suite has ever needed.
Verification
uv run ruff checkanduv run ruff format --checkare cleanuv run mypyis clean (strict)uv run pytestpasses locally — 702 testsCHANGELOG.mdhas an entry under## [Unreleased]Checked in both directions, so the setting is demonstrably read and
enforced rather than silently ignored:
Notes
No source or test changes — the coverage figure is unchanged, only
enforced. CI already invokes
pytest --cov=netprotocols, so the gateapplies to the existing command with no workflow edit.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QJnVMNGwTRDktC4rkABtgt
Generated by Claude Code