A support ticket arrives. Two users are looking at the same record and reading different numbers. Nothing in the logs. No exception, no failed request, no alert. The row is simply wrong, and nobody can say when it became wrong.
Trace it far enough and you often land on the same small piece of UI: a dropdown that lets the user change the unit a quantity is displayed in. Kilograms or pounds. Therms or MMBtu. Minutes or hours. Someone built it as a convenience, wired it straight to the field, and it writes back.
That control is not a formatting feature. It is a write path into your data, and it is almost never treated like one.
The shape of the bug
Here is the version that gets shipped. It looks harmless in review.
// The user picks a unit from the dropdown. function onUnitChange ( next : Unit ) { const converted = convert ( form . quantity , form . unit , next ); form . quantity = converted ; // <- the display just wrote to the model form .…