Engineering essays.
Deep-dives on AI code review, multi-agent architecture, and the craft of shipping reliable software at speed.
August 24, 2026Technical Deep DiveRazorpay Webhook Amount in Paisa vs Rupees: The 100x Bug
Real PR catch: Razorpay amount treated as rupees — 100× overbilling. Paise convention fix.
8 min read· Mesrai Team
August 23, 2026Technical Deep DiveCurrency Conversion at Read Time vs Write Time: The Drift Bug
Real PR catch: FX at report time — historical totals drift. Write-time capture fix with schema change.
8 min read· Mesrai Team
August 23, 2026Technical Deep DiveDiscount Stacking Without Cap: The Free-Shipping Loop Bug
Real PR catch: discounts stacked multiplicatively with no cap — power users drop subtotal to 26%. Cap fix.
8 min read· Mesrai Team
August 22, 2026Technical Deep DiveNumber.toFixed for Money: Why Mesrai Always Says No
Real PR catch: toFixed for currency formatting — runtime inconsistency. Integer-paise + Intl fix.
8 min read· Mesrai Team
August 22, 2026Technical Deep DiveOff-By-One in Subscription Trial Day Calculation
Real PR catch: setDate trial calc — mutates source, drifts at DST. date-fns addDays fix.
8 min read· Mesrai Team
August 21, 2026Technical Deep DiveGST Calculation on Negative Refunds: How Mesrai Spots the Sign Flip
Real PR catch: refund-invoice with Math.abs on amount — GST positive on negative invoice. Sign-preserving fix.
8 min read· Mesrai Team
August 21, 2026Technical Deep DiveMixing INR + USD in the Same Aggregation: A Multi-Currency Catch
Real PR catch: SUM(amount) across mixed currencies — meaningless total. Group-by-currency + base-currency column fixes.
8 min read· Mesrai Team
August 20, 2026Technical Deep DiveFloat Arithmetic in Currency: The Refund Rounding Bug Mesrai Saved
Real PR catch: refund using float math — drift compounds over transactions. Integer-paise fix.
8 min read· Mesrai Team
August 20, 2026Technical Deep DiveTime Zone Bug in Date Filter API: The Asia/Kolkata Catch
Real PR catch: UTC date parse for IST-user date filter — misses 5.5 hours per day. fromZonedTime fix.
8 min read· Mesrai Team
August 19, 2026Technical Deep DiveWebhook Signature Verification Skipped on a New Provider
Real PR catch: webhook handler without HMAC check — anyone can forge events. timingSafeEqual fix.
8 min read· Mesrai Team
August 19, 2026Technical Deep DiveDeprecated Endpoint Re-Used in New Code: Mesrai's Removal Audit
Real PR catch: new feature calling @deprecated endpoint — blocks removal. Replacement call fix.
8 min read· Mesrai Team
August 18, 2026Technical Deep DiveEvent Payload Schema Change Without Versioning: The Consumer Break
Real PR catch: Kafka event field rename — 3 consumers still on old name. Dual-publish + version fix.
8 min read· Mesrai Team