[PR #537] Add comprehensive code coverage documentation and enforcement #548

Closed
opened 2026-03-02 04:13:56 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/537

State: closed
Merged: Yes


Summary

This PR adds comprehensive documentation and tooling for the projects code coverage policy, making the existing CI enforcement visible and maintainable.

Changes

1. Enhanced CI Workflow Documentation

  • Added inline comments to .github/workflows/coverage.yml explaining the 50% threshold
  • Documents that threshold is based on current coverage (54.10%) rounded down to nearest 5%

2. Updated Contributing Guide

  • Added code coverage section to CONTRIBUTING.md
  • Documents the 50% minimum threshold requirement
  • Provides task coverage command for local testing
  • Clarifies that CI enforces this threshold on all PRs

3. Coverage Automation Script

  • Created scripts/update-coverage-threshold.sh for automated threshold updates
  • Calculates current coverage percentage
  • Rounds down to nearest multiple of 5
  • Updates .github/workflows/coverage.yml automatically
  • Useful when coverage improves and maintainers want to raise the bar

4. Comprehensive Coverage Documentation

  • Created docs/COVERAGE.md with complete policy documentation
  • Explains threshold calculation methodology
  • Documents CI enforcement mechanism
  • Provides local testing commands (coverage, coverage:html, coverage:lcov, coverage:check)
  • Lists exclusions (tests/, benches/, examples/*)
  • Best practices for maintaining coverage

Motivation

The project already has a 50% coverage threshold enforced in CI, but this was not documented anywhere visible to contributors. This PR makes the policy explicit and provides tools for maintaining it.

Current Coverage Status

  • Current coverage: 54.10%
  • Enforced threshold: 50%
  • Calculation: Current coverage rounded down to nearest 5%

Testing

  • Verified existing CI workflow configuration
  • Tested script syntax with bash -n
  • Confirmed coverage calculation matches expected values

🤖 Generated with Claude Code


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/537 **State:** closed **Merged:** Yes --- ## Summary This PR adds comprehensive documentation and tooling for the projects code coverage policy, making the existing CI enforcement visible and maintainable. ## Changes ### 1. Enhanced CI Workflow Documentation - Added inline comments to `.github/workflows/coverage.yml` explaining the 50% threshold - Documents that threshold is based on current coverage (54.10%) rounded down to nearest 5% ### 2. Updated Contributing Guide - Added code coverage section to `CONTRIBUTING.md` - Documents the 50% minimum threshold requirement - Provides `task coverage` command for local testing - Clarifies that CI enforces this threshold on all PRs ### 3. Coverage Automation Script - Created `scripts/update-coverage-threshold.sh` for automated threshold updates - Calculates current coverage percentage - Rounds down to nearest multiple of 5 - Updates `.github/workflows/coverage.yml` automatically - Useful when coverage improves and maintainers want to raise the bar ### 4. Comprehensive Coverage Documentation - Created `docs/COVERAGE.md` with complete policy documentation - Explains threshold calculation methodology - Documents CI enforcement mechanism - Provides local testing commands (coverage, coverage:html, coverage:lcov, coverage:check) - Lists exclusions (tests/*, benches/*, examples/*) - Best practices for maintaining coverage ## Motivation The project already has a 50% coverage threshold enforced in CI, but this was not documented anywhere visible to contributors. This PR makes the policy explicit and provides tools for maintaining it. ## Current Coverage Status - **Current coverage:** 54.10% - **Enforced threshold:** 50% - **Calculation:** Current coverage rounded down to nearest 5% ## Testing - Verified existing CI workflow configuration - Tested script syntax with `bash -n` - Confirmed coverage calculation matches expected values 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/537" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
kerem 2026-03-02 04:13:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#548
No description provided.