Skip to content

ci: enforce the 100% coverage gate - #150

Merged
rennf93 merged 1 commit into
masterfrom
ci/coverage-gate
Sep 30, 2026
Merged

rennf93 merged 1 commit into
masterfrom
ci/coverage-gate

Conversation

@rennf93

@rennf93 rennf93 commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Brings fastapi-guard in line with guard-core's coverage gate: --cov-fail-under=100 on the CI pytest run. Measured locally at 100.0% statement coverage, matching the engine baseline convention.

Summary by CodeRabbit

  • Tests
    • Automated checks now require tests to cover every branch of the code. Changes that do not meet this coverage threshold will fail the relevant check, helping ensure conditional behavior is exercised before changes are accepted. This update affects the validation process and does not change application functionality.

@rennf93 rennf93 added the no-issue Chore or dependency PR that does not need an issue label Sep 28, 2026
@github-actions github-actions Bot added the ci GitHub Actions and pre-commit label Sep 28, 2026
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6f13216b-d1eb-405a-bac2-7cc5280435bd

📥 Commits

Reviewing files that changed from the base of the PR and between 33c9499 and a7ee8d1.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The CI pytest command now fails when guard coverage is below 100%. The command previously enabled branch coverage without setting a minimum threshold.

Changes

CI Coverage

Layer / File(s) Summary
Enforce minimum coverage
.github/workflows/ci.yml
The pytest command adds --cov-fail-under=100 to enforce the minimum coverage threshold.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to a7ee8

This change only makes CI fail when guard coverage drops below 100%. It does not affect runtime behavior. If branch coverage is currently below 100%, CI will fail visibly and can be fixed before merge.

Architecture Summary

Architecture risk: 🔵 Low · up to a7ee8

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/workflows/ci.yml: The pytest command adds --cov-fail-under=100, causing the coverage run to fail when guard coverage is below 100%; previously, no minimum was enforced.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: enforcing a 100% coverage gate in CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rennf93
rennf93 merged commit 21e24bb into master Sep 30, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci GitHub Actions and pre-commit no-issue Chore or dependency PR that does not need an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant