A duplicate-customer scan ran right after its own transaction returned, but on the website path that transaction was only a savepoint inside the caller's. A read-only audit, not the 1,319 tests already passing, found that bug and three more like it.
PostgreSQL stores every timestamp with a time zone as UTC internally, but reads and writes naive timestamp text through the session's timezone setting, and Laravel sends naive text by default. In a non-UTC session, a training-academy system read instants back seven hours early with zero errors, invisible only because dev and CI containers already ran UTC.
A weekly audit ledger sealed each finding into a SHA-256 hash chain, but the hash and the database row each read the clock independently — so every untampered entry would have verified as tampered. The fix was one field, passed explicitly instead of left to a schema default.
A refactor made a branch entity canonical across tenant workspaces so it could belong to several at once — but the balance queries that filtered on its id kept summing every workspace's top-ups and usage together, so a workspace with no billing connection configured still saw another tenant's budget on its dashboard.
SentraOps ships stock between warehouses through one shared virtual TRANSIT buffer, and a plan-checker caught the flaw before a line of code existed: freezing the unit cost at ship time breaks the moment two transfers of the same item at different costs land in that buffer and get received out of order.
A goods-receipt line's unitCost field meant two different things at once — the vendor's price, and that price plus the freight allocated onto it. The moment the second meaning won, the AP invoice's GR/IR clearing math invented a purchase-price variance that was never real.
A branch-satisfaction survey for a multi-branch aesthetic clinic chain went from sixteen hardcoded questions to an admin-editable form, and the entire design turned on one rule: an edit that would change what a past answer means has to fork the question, not overwrite it, and the fork boundary is enforced by what the code can't do.
WhatsApp status counts tallied from a vendor's delivery log are exclusive latest-state buckets, not a running total — dividing every rate by raw sentCount produced a 177.8% reply rate and a 2,881% delivered rate in production, and the fix needed no new column, only different arithmetic.
Fixing a cross-tenant IDOR taught me that 'access denied' and 'does not exist' are the same message when the requester should never learn which one is true.
Two POS terminals sell the last unit in the same second. Inventory survives that only if every stock mutation goes through one function, one advisory lock, and one idempotency key — and if sub-cent rounding residue dies the moment stock hits zero.