Skip to content

Adopt tiered coverage gates#63

Merged
negillett merged 4 commits into
mainfrom
tiered-coverage-policy
May 30, 2026
Merged

Adopt tiered coverage gates#63
negillett merged 4 commits into
mainfrom
tiered-coverage-policy

Conversation

@negillett

Copy link
Copy Markdown
Member

Summary

  • Move enforcement from pytest --cov-fail-under=95 to tiered check-coverage.sh
  • 90% total and 95% on intentproof/ package

Test plan

  • bash scripts/run-coverage-gate.sh

Move threshold enforcement from pytest fail-under to tiered
check-coverage.sh (90% total, 95% on intentproof/).

Signed-off-by: Nathan Gillett <nathan@intentproof.io>
@cursor

cursor Bot commented May 30, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes only test/coverage tooling and CI steps; no runtime SDK or security behavior.

Overview
Replaces the flat 95% pytest/coverage fail-under with tiered gates: 90% total and 95% on the intentproof/ package surface, configured in scripts/coverage-tiers.conf and documented in scripts/README-coverage-tiers.md.

check-coverage.sh now reads coverage.json, applies total and per-prefix critical rules, uses integer statement math for pass/fail (with truncated display so UI cannot round up past a failure), and fails if a critical prefix matches no statements.

run-coverage-gate.sh runs pytest, emits coverage.json, then invokes the tier checker—used in CI and release workflows instead of separate pytest + check-coverage.sh 95 steps. pyproject.toml drops fail_under and --cov-fail-under. Small bash regression tests cover path resolution, display vs gate semantics, and missing critical prefixes.

Reviewed by Cursor Bugbot for commit b0bc499. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread .github/workflows/release-pypi.yml
Comment thread scripts/check-coverage.sh Outdated
Comment thread scripts/check-coverage.sh
Signed-off-by: Nathan Gillett <nathan@intentproof.io>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dfb63cf. Configure here.

Comment thread scripts/check-coverage_critical_prefix_test.sh Outdated
Comment thread scripts/check-coverage.sh Outdated
Nathan Gillett added 2 commits May 30, 2026 10:20
Signed-off-by: Nathan Gillett <nathan@intentproof.io>
Signed-off-by: Nathan Gillett <nathan@intentproof.io>
@negillett negillett merged commit b56f571 into main May 30, 2026
10 checks passed
@negillett negillett deleted the tiered-coverage-policy branch May 30, 2026 15:33
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