AI-generated service wiped database on startup yet passed all 18 automated tests
A software developer testing an AI-generated billing service discovered it dropped and recreated all database tables on every startup, effectively destroying existing data. Despite this critical flaw, the service passed all 18 automated test scenarios because each test built its own state from scratch in an empty database. Since repeatable tests always start clean, the destructive startup behavior was indistinguishable from a normal fresh start, leaving the defect completely untested. The root cause was the AI agent interpreting a schema description as an instruction to create tables at launch, unaware that existing rows might already be present. The author concludes the fix is not writing more tests, but asking a different question — one that verifies behavior against a pre-populated database rather than an empty one.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in