
Green Tests, Red Reality
I trusted a green test suite this week and it nearly cost me a launch.
A .NET API, 748 tests passing, docs stating Postgres in production. I containerised it for deploy, stood it up on a fresh Postgres, and watched it crash-loop. The whole migration chain, 33 files, had been scaffolded against SQLite, so the column types were SQLite’s. Replayed on Postgres they threw cast errors, and the API never came up healthy.
The tests passed because they ran on SQLite, the same engine the migrations were born on. Nobody had ever actually stood the thing up on the database it was meant to ship on.
It is like rehearsing a play in your living room and calling it ready for a theatre you have never walked into. Every line word-perfect. The stage a different shape.
There was a quieter one underneath. The production config read one connection-string key while the compose file set another, so the real setting was ignored and the app fell back to a throwaway database inside the container. No error. Just the wrong data store, silently.
Here is the take. AI writes plausible, passing code faster than I can read it. The gap it leaves is rarely the logic. It is the environment the tests never exercised. So the job has shifted: less time typing, more time asking one question. Has this actually run where it is going to live? I brought up a fresh Postgres, curled the health endpoint myself, and only believed it at the 200.
Green is a colour, not a guarantee.


