A ticket landed on my desk: the Bill info on the UI was breaking. Running it locally, I traced it to a single Provider that was coming back as multiple records instead of one — and the .NET query expected exactly one, so it threw instead of quietly taking the first.
Once I understood it, I hopped on a screen share with the engineer who owned the ticket and showed them we could clear the bad state right from the UI.
But it nagged at me. How did it get into that state in the first place? Talking it through, I realized the real fix wasn’t this one bill — it was making the bad state impossible to create, on both the front end and the back end.
And if this bill was broken, how many others were? I ran a quick query across our shards and found over 300 bills with duplicate providers — every one throwing the same error.
Comparing the records, the pattern jumped out: on every single bill, one Provider ID was a real GUID and the other was a string of zeros. Deleting the zero-GUID provider fixed them. Every one had been created back in 2022, and none had surfaced since — except the one that reached my desk.