Production War Stories

I Shipped a Race Condition That Double-Charged Customers (And Other War Stories)

Nobody writes blog posts about the bugs they shipped. The internet is full of “how I built X” and suspiciously empty of “how I broke X and spent 14 hours pretending it wasn’t my fault.” Here are mine. The Race Condition: Two Cashiers, One Item This one happened in Polaris, the ERP system I built for retail businesses. Real money, real transactions, real angry shop owners. The setup: two cashiers at different terminals. Both scan the same product. Both hit “Complete Sale” within 200ms of each other. The inventory says there’s one left. ...

November 15, 2025 · 8 min · Muhammad Hassan Raza