Skip to content

The Contract Test Is the Only Witness the Agent Cannot Author

8.2 relevance
Score Breakdown
technical depth
9
novelty
8
actionability
8
community
6
strategic
7
personal
10

Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.

Contract test blind spots in AI-generated code is a critical insight for AI-assisted development practices.

AI/ML dev.to
The Contract Test Is the Only Witness the Agent Cannot Author
Summary

When an AI agent renames a field from `reservationId` to `bookingId` in both the client code and its unit test mocks, the test stays green because the agent authored both sides of the wire. The real production API still expects `reservationId`, causing four hours of failed orders and a 90-minute rollback. The structural failure is that a test written by the same optimizer that wrote the code is a mirror, not verification — it certifies internal consistency rather than correctness against an external contract.

Author

Travis Frisinger

More from Travis Frisinger →