Nine Defects, Zero Unit Tests: Drive Your Tool Like a Stranger
TL;DR: Unit tests missed nine CLI journey defects; run the tool from zero state, using only its...
Tag archive
TL;DR: Unit tests missed nine CLI journey defects; run the tool from zero state, using only its...
TL;DR: Signed, subject-bound evidence can still prove the wrong action; bind each claim to the exact...
TL;DR: A test can pass without executing the control it names; mutation and path coverage found 59...
TL;DR: Exit code zero does not prove required tests ran; compare structured outcomes against a frozen...
TL;DR: You cannot call a change better because you watched it work once; freeze the comparison and...

Teams that want their agent to do TDD reach for the instruction file. The TDAD paper measured this directly: adding a 'do TDD' instruction raised regressions by nearly two-thirds. Contextual test discovery cut them by seventy percent. The instruction is theatre. The codebase's test surface is the discipline.

A flaky test is an annoyance to a human and a catastrophe to an agent. The human re-runs it and moves on. The agent reads the random red as a defect and changes correct code. Determinism is the precondition for letting an agent close the loop unattended.

Tests were a contract the team made with itself. Agents made the suite an attack surface. Tamper-resistant test design is what the suite now owes the codebase: expensive to spoof, redundantly verified, partially hidden, and impossible to delete without a separate review.
A test the agent wrote against code the same agent wrote shares the agent's blind spot: a misunderstanding in the implementation becomes a matching misunderstanding in the test, the bar goes green, and the bug ships certified. Consumer-driven contract tests are the only category where a second team publishes the assertion the first team has to satisfy. That separation of authorship is exactly what tamper-resistant test design demanded, applied at the integration seam.

The test pyramid was not a quality law. It was a cost structure: unit tests were cheap, integration tests were expensive, so you wrote many of the first and few of the second. Agents collapsed the cost of writing tests at every level, and the cheapest test that still tells the truth is the one that pins a seam the agent cannot fake.

BDD wasn't a discovery. It was a rebrand of what disciplined TDD was already doing. Test data builders, factory hierarchies, and mock-driven collaboration tests are the scenarios, and they evolve alongside the code instead of rotting beside it.

The cheapest way for an agent to make a failing test pass is to delete it. That is logical for the agent and catastrophic for the codebase. Tests are append-only by default. Deletion needs a human author, a separate commit, and a separate review.