Skip to content

CP-3580: add coverage gate to squawk-pre-commit#10

Merged
stephen-kintsugi merged 1 commit into
mainfrom
task/CP-3580/squawk-coverage
Jul 24, 2026
Merged

CP-3580: add coverage gate to squawk-pre-commit#10
stephen-kintsugi merged 1 commit into
mainfrom
task/CP-3580/squawk-coverage

Conversation

@stephen-kintsugi

@stephen-kintsugi stephen-kintsugi commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added the standardized coverage gate to CI (lint-and-test job), mirroring kintsugi-rules be-pr.yml but run directly (squawk CI is not Dockerized).
  • pytest now produces coverage.xml and enforces a total floor via --cov-fail-under=95 (current total is 97%, so the gate passes today and ratchets later).
  • On PRs, diff-cover fails when changed-line coverage vs origin/main is below 80%.
  • Added diff-cover ~=10.2.1 dev dep (pytest-cov was already present); gitignored coverage.xml.
  • Bumped the package version 0.3.4 -> 0.3.5 in pyproject.toml and squawk_alembic/__init__.py to satisfy the version-consistency gate.

Jira

CP-3580

Tests

Ran locally: pytest --cov-fail-under=95 passes at 97.11% total; diff-cover coverage.xml --compare-branch=origin/main --fail-under=80 passes (changed lines 100%). Pre-commit (ruff, pyrefly, poetry-check) green.

Document Checklist

n/a

🤖 Generated with Claude Code


Note

Low Risk
Changes are limited to CI, dev dependencies, gitignore, and version bump; no runtime or application logic is modified.

Overview
Adds coverage enforcement to the lint-and-test CI job: pytest now reports coverage for squawk_alembic, writes coverage.xml, and fails below 95% total coverage.

On pull requests, a new step runs diff-cover against origin/main and fails if changed-line coverage is under 80% (with an extra git fetch so the merge-base is available).

Adds diff-cover as a dev dependency, ignores coverage.xml in git, and bumps the package version 0.3.4 → 0.3.5 in pyproject.toml and squawk_alembic/__init__.py.

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

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@stephen-kintsugi
stephen-kintsugi merged commit 3d94c16 into main Jul 24, 2026
4 checks passed
@stephen-kintsugi
stephen-kintsugi deleted the task/CP-3580/squawk-coverage branch July 24, 2026 22:36
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.

2 participants