verifying-change-coverage

Computes diff coverage on changed lines using LCOV or Cobertura reports and git diffs.

113|17|Updated Oct 5, 2025
Ready to run
npx skills add https://github.com/jaktestowac/awesome-copilot-for-testers --skill verifying-change-coverage-jaktestowac
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: verifying-change-coverage
Source: https://github.com/jaktestowac/awesome-copilot-for-testers/tree/main/plugins/verifying-change-coverage/skills/verifying-change-coverage
Command: npx skills add https://github.com/jaktestowac/awesome-copilot-for-testers --skill verifying-change-coverage-jaktestowac

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Repo-wide coverage percentages hide untested new code because a large denominator absorbs a small numerator. This Skill verifies whether the specific lines and branches a change introduced were actually executed by tests, and escalates uncovered high-risk changes into a blocking finding. ## Core Features & Use Cases - Diff Coverage Analysis: Intersects added lines from a git diff with executed lines from LCOV or Cobertura artifacts, computing per-file and overall diff coverage plus separate branch coverage on changed lines. - Risk-Based Verdicts: Classifies uncovered groups (untested logic, defensive code, instrumentation, unreachable code) and escalates to BLOCK on files tagged auth, critical-path, db-migration, or new-endpoint. - CI Gate Wiring: Provides working GitHub Actions and GitLab CI configurations with diff-cover, artifact merging across suites, sticky PR comments, and a warn-then-block rollout strategy. - Use Case: A pull request shows 84% repo coverage and a green suite, but the new payment refund path has no test. This Skill intersects the diff with the coverage artifact, reports the uncovered lines 88-91 as a finding, and blocks the merge. ## Quick Start Verify whether the changes in this pull request against main are actually executed by tests using the coverage report in coverage/lcov.info.

Frequently Asked Questions about verifying-change-coverage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I measure test coverage only for changed lines in a pull request?▼

Generate a git diff with --unified=0 against the base ref, produce an LCOV or Cobertura report from your test run, then intersect added executable lines with executed lines. Tools like diff-cover automate this intersection and support a --fail-under threshold.

What is the difference between diff coverage and repo-wide coverage?▼

Diff coverage measures execution only on lines the change added, while repo-wide coverage divides by all lines in the codebase. A repo at 84% can merge untested code and stay at 84%, so diff coverage is the metric that maps to the risk a change introduces.

How do I set up diff coverage in GitHub Actions?▼

Checkout with fetch-depth: 0 so a merge base exists, run tests with an LCOV reporter, then run diff-cover with --compare-branch and --fail-under. Post results with a sticky pull request comment keyed on a header so each run replaces its own comment.

Why does my diff coverage report show 0% in a monorepo?▼

Coverage paths are relative to the package run root while diff paths are relative to the repo root, so nothing intersects. Normalize both sides to repo-root-relative POSIX paths before matching, and verify with one file you know is tested.

Should uncovered lines always fail a coverage gate?▼

No. Logging, exhaustiveness guards, and unreachable code are legitimate exceptions that should be recorded with a reason, owner, and expiry. Untested logic, error paths, and new conditionals on auth or money handling are findings that warrant blocking.

Does high diff coverage prove the tests are good?▼

No. Coverage proves execution, never correctness; an assertion-free test covers everything and verifies nothing. Pair coverage gates with test-quality review to avoid coverage theatre where the number is met by asserting nothing.