Coding agent accidentally TRUNCATEs dev database while running SAML tests

skryking · reddit · 2026-10-27

A Reddit user shares how an AI coding assistant pointed SAML tests at the local dev database and wiped it via TRUNCATE between tests, leaving only two test-created users.

The agent caught its own mistake, inspected the Postgres container via docker exec, concluded the dev DB held little beyond test churn with production and relaye2e untouched, then re-ran tests properly with testcontainers.

The author laughs it off since it was only dev data, but warns this could be disastrous against production — a reminder to isolate environments when letting agents run database commands.

Original post →

More from coding & agent

coding & agent channel →