AI-written tests
- Source same context window
- Pass means they agree with the function
Topic · Agents
Proof does. Recover the intent, pin it, and run proof audit. CodeQL, Stryker, and Hypothesis check the code against itself or against generic rules. They never check it against what you meant.
proof audit
Not a replacement for static analysis. Keep those tools. They do not hold the shall.
01 · The circular proof
When an agent writes a function and then writes the test, both artifacts came out of the same context window. The test passes because it was derived from the code it is checking. Agreement was never the question. The question is whether either one matches what you meant.
AI-written tests
Intent
Not in the loop. Nobody approved the cap.
OutsideThe loop
Still green. Agreement was cheap.
Green suiteProof
Same agent. Two checks. Click the tabs.
02 · Outside the loop
Recover intent first, and have a human approve it. Measure the AI’s tests against that spec, not the implementation. Force condition-level coverage on the decision logic models learn from happy-path examples. Turn each finding into a red reproducer the agent has to clear, and an independent gate agrees — not the model.
On the public jsonparser audit, 100% MC/DC still let a defect ship, because the missing partition was never in the denominator. Coverage of the code is not a check of the intent. That is the whole argument, and it is on Agents as the product shape.