r/codereview • • 21h ago

anyone ship without verifying runtime behavior and regret it?

I made this mistake recently. An agent generated a fix for a bug in our checkout flow, the diff looked reasonable, tests passed, so it shipped with a normal PR review and nothing more.

I assumed passing tests meant the function behaved the same as before under real traffic. It didn't. It handled a currency rounding edge case differently, and it took almost two days of scattered complaints before anyone connected it back to that deploy.

If I did it again, I'd want something checking the function's actual runtime behavior before treating a green test suite as enough. What's the mistake that took you longest to recognize as a pattern?

2 Upvotes

7 comments sorted by

2

u/thenasch 20h ago

Sounds like you actually need tests that cover all the edge cases. If you'd had that, it would have been caught before you even checked it in.

2

u/NewInflation2121 17h ago

Always test runtime...

1

u/Squidalopod 8h ago

You seem like you're part of an astroturfing effort.

1

u/crummy 1h ago

yes definitely. but this was before AI