Your coverage check passed. Your refund guard just lost its only test.
A coverage percentage tells you how much of your code is tested. It can’t tell you which code just stopped being tested. Drape compares coverage line by line, so the pull request that drops a test fails, whatever the percentage does.
Watch · 1 minute
See the gift card PR lose its refund test
A gift card pull request raises coverage but deletes the only test for the over-refund guard. Drape fails it line by line, and a coding agent restores the test. Captions are on screen, so it works muted.
Read the transcript
A coverage percentage tells you how much of your code is tested. It can't tell you which code just stopped being tested.
Priya's gift card pull request tests almost every new line, and overall coverage goes up. A percentage gate waves it straight through.
Drape compares coverage line by line against main. Two lines that were tested before aren't tested anymore, so Drape fails the pull request.
And it shows you exactly where, down to the line.
Those two lines block a refund bigger than what the customer paid. The pull request deleted the slow test that covered them.
The same check fails the build in CI, so it can't merge by accident.
Through Drape's MCP server, Claude Code or Codex can pull the lines that lost coverage and write the missing test.
Push the test, and the check passes. Not just more coverage. The right code, still covered.
Drape. The CI brain.
A percentage gate misses it, and agents make it worse
Teams that stop reading every diff lean on checks like coverage instead. Then the check is the review, and a percentage is not good enough to be the review.
Agents aim for a passing build
When a test is slow or fails, the shortest path to a passing build is often to delete or skip it. A percentage gate rarely notices.
Lots of tested code hides the gap
A large, well-tested pull request raises the percentage, and that hides the lines it left without a test.
Nobody reads the diff
When an agent opens the pull request and another agent reviews it, the deleted test can merge before a person sees it.
One gift card PR, two lines that matter
A pull request adds gift card payments to a demo storefront. It tests 149 of its 150 new lines and lifts coverage from 82.76% to 83.54%. To speed up the suite, it also deletes a slow test, the only one covering the guard that stops a refund bigger than the customer paid. Every screen below is the Drape product.
Catch
Drape fails the pull request that drops tested lines
Drape compares coverage on every pull request with its base, line by line. Two
lines that were tested on main aren’t tested anymore, so the check fails,
even though coverage went up. It shows you exactly where, down to
refunds.py lines 43–44.
- Reads Cobertura, LCOV and Go coverage, with no proprietary format
- Checks the lines each pull request changes, not the whole codebase
- Tracks coverage commit to commit, so you can see when a line lost its test
Block
The same check fails CI
The Drape CLI and GitHub Action upload coverage and fail the build on a regression, so the pull request can’t merge by accident.
$ drape upload coverage coverage.xml
Head: 83.54% (+0.78%)
Regressed: 2 lines
Regressed files:
src/storefront/checkout/refunds.py: 2 lines (43-44)
Result: FAILED
- Coverage regression: 2 previously-covered lines lost coverage
Fix
Your agent writes the missing test
“Coverage dropped 0.1%” gives an agent nothing to act on. “Lines
43 and 44 in refunds.py lost their test” tells it which test to
write. Through Drape’s MCP server,
Claude Code, Cursor or Codex pulls the lines that lost coverage and restores the
test.
> Why is coverage failing on PR 451?
● drape · get_pr_report(repo="storefront", pr=451)
refunds.py 43-44: covered on main, not in this pull request
● The over-refund guard lost its only test.
Restoring it as a fast unit test.
+ def test_refund_cannot_exceed_capture(payment):
+ with pytest.raises(RefundExceedsCapture):
+ refund(payment, payment.captured_amount + 1)
Pass
Push the test, and the check passes
No regressed lines, and the refund guard is covered again. Not just more coverage: the right code, still covered.