A customer typed “Youth Extra Large” into a shirt-size field, hit submit, and lost the entire registration, not just the row with the bad value. The field was free text, the database column had a length limit, and the overflow threw an error that took the whole import down with it.

The first fix looked complete

I built canonical size codes so the field would be a dropdown instead of free text, and added a length guard to the save path so anything too long would fail cleanly instead of crashing. It compiled, it deployed, and I moved on.

It did nothing. The guard was correct code sitting in the wrong place: an older dialog handler that used to own the save action, before the live “edit this field” flow was rebuilt to call a different function entirely. The path a real edit actually runs through had no length check at all, the same as before the fix shipped.

Finding out the hard way

I had already tested the guard against the live production endpoint, watched it come back clean instead of crashing, and called that definitive proof the fix was live. I was most of the way through closing the ticket when a pointed question stopped me: hadn’t these popups already been migrated, and was I sure the page I had just patched was even still in use? Tracing the actual click path, not the file I remembered editing, showed the guard sitting in dead code: nothing in the current UI called it anymore. Whatever used to route through it had been replaced, and nobody had gone back to delete the old handler or update the comment claiming it was still load-bearing.

Moving the guard to the real save path took a few minutes once I knew where to look. Verifying it took longer: I ran the same over-length value through the actual edit dialog and confirmed it came back as a clean validation error instead of a crash, then ran a normal, valid value through the same path to confirm nothing else broke. Both hotfixes shipped to production.

The habit this forces now

“I fixed the validation” and “I fixed the validation in the code that actually runs when someone clicks save” are different claims, and only one of them is worth anything to the person hitting the bug. A length guard sitting in a function nothing calls is indistinguishable from no guard at all, right up until someone reads the diff and assumes the problem is solved.

The rule I took out of this: before calling a validation fix done, trace the live entry point by hand. Not the function with the right name, not the file that used to own this feature, the one thing the current UI actually invokes when a real person clicks the real button. If you can’t point to that call chain, you haven’t verified the fix, you’ve verified that some code somewhere now has a guard in it.