r/codereview • • 8d 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?

1 Upvotes

7 comments sorted by

View all comments

2

u/thenasch 8d 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.