Skip to content

Enforce the coverage level already achieved - #112

Merged
EONRaider merged 1 commit into
masterfrom
claude/decoder-depth-polish-8m54to
Sep 1, 2026
Merged

Enforce the coverage level already achieved#112
EONRaider merged 1 commit into
masterfrom
claude/decoder-depth-polish-8m54to

Conversation

@EONRaider

Copy link
Copy Markdown
Owner

Summary

Closes#79.

Coverage ran on every CI build and failed on nothing.
[tool.coverage.report] set only show_missing, so a drop was reported
and then ignored. The bar had already been cleared — 1441 statements,
3 missed, 99.79%
— it just was not held.

What's included

  • pyproject.tomlfail_under = 98 under [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__NotImplemented branch. Both are trivially coverable, so 100
was tempting — but a gate at 100 turns every legitimately unreachable
branch into a CI failure and invites # pragma: no cover scattered
through 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 check and uv run ruff format --check are clean
  • uv run mypy is clean (strict)
  • uv run pytest passes locally — 702 tests
  • CHANGELOG.md has an entry under ## [Unreleased]

Checked in both directions, so the setting is demonstrably read and
enforced rather than silently ignored:

fail_under = 98 → Required test coverage of 98.0% reached.
Total coverage: 99.79% exit 0
fail_under = 100 → FAIL Required test coverage of 100.0% not reached.
Total coverage: 99.79% exit 1

Notes

No source or test changes — the coverage figure is unchanged, only
enforced. CI already invokes pytest --cov=netprotocols, so the gate
applies to the existing command with no workflow edit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QJnVMNGwTRDktC4rkABtgt


Generated by Claude Code

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
@EONRaider
EONRaider merged commit 9963399 into masterSep 1, 2026
6 checks passed
@EONRaiderEONRaider mentioned this pull request Sep 4, 2026
Sign up for freeto 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.

Enforce the coverage level already achieved

2 participants

@EONRaider@claude