Skip to lesson
Exit
AI-assisted review, testing & anti-patterns1 / 2

1 min lesson

Coverage is a gate input, never the goal

Use the lesson to respond to this: "Coverage on a team's repo jumps from 60% to 92% the month after they adopt an AI agent, but production incidents don't drop. What's the most likely explanation?" Keep the answer plain.

Step 1 of 2

Coverage is a gate input, never the goalGoodhart's Law

Coverage is useful as a floor. A PR that drops coverage on a critical module is worth a second look. The moment coverage becomes a target, Goodhart's Law kicks in: "when a measure becomes a target, it ceases to be a good measure." Teams and agents chasing a 90% number generate tests that execute lines without asserting anything meaningful, so coverage climbs while real safety goes flat or down. AI makes this worse: it manufactures coverage-padding tests by the dozen in seconds.

Say it like this

"Coverage tells you what code ran, never whether it's correct. We gate on coverage as a floor and review tests for whether they assert intent. An agent can take any number to 90% - that's exactly why the number can't be the goal."