CP-3580: add coverage gate to squawk-pre-commit#10
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
michael-kintsugi
approved these changes
Jul 24, 2026
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.
Summary
lint-and-testjob), mirroring kintsugi-rulesbe-pr.ymlbut run directly (squawk CI is not Dockerized).pytestnow producescoverage.xmland enforces a total floor via--cov-fail-under=95(current total is 97%, so the gate passes today and ratchets later).diff-coverfails when changed-line coverage vsorigin/mainis below 80%.diff-cover ~=10.2.1dev dep (pytest-covwas already present); gitignoredcoverage.xml.0.3.4 -> 0.3.5inpyproject.tomlandsquawk_alembic/__init__.pyto satisfy the version-consistency gate.Jira
CP-3580
Tests
Ran locally:
pytest --cov-fail-under=95passes at 97.11% total;diff-cover coverage.xml --compare-branch=origin/main --fail-under=80passes (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-testCI job:pytestnow reports coverage forsquawk_alembic, writescoverage.xml, and fails below 95% total coverage.On pull requests, a new step runs
diff-coveragainstorigin/mainand fails if changed-line coverage is under 80% (with an extragit fetchso the merge-base is available).Adds
diff-coveras a dev dependency, ignorescoverage.xmlin git, and bumps the package version 0.3.4 → 0.3.5 inpyproject.tomlandsquawk_alembic/__init__.py.Reviewed by Cursor Bugbot for commit b6be76d. Bugbot is set up for automated code reviews on this repo. Configure here.