Engineering essays.
Deep-dives on AI code review, multi-agent architecture, and the craft of shipping reliable software at speed.
August 12, 2026Technical Deep DivePromise<void> Returning Inside a Sync Caller: A Quiet Bug
Real PR catch: async dispatch called without await — unhandled rejection crashes process. Await or explicit catch fix.
8 min read· Mesrai Team
August 11, 2026Technical Deep Diveas Casting User Input Without Validation: How Mesrai Suggests Zod
Real PR catch: branded-type cast without validation. Zod brand schema fix.
8 min read· Mesrai Team
August 11, 2026Technical Deep DiveDiscriminated Union Missing default: An Exhaustive-Switch Catch
Real PR catch: switch over union missing a new variant. `never` exhaustiveness fix.
8 min read· Mesrai Team
August 10, 2026Technical Deep DiveThe any Cast Mesrai Caught in a Trust Boundary
Real PR catch: `req.body as User` — type assertion is not validation. Zod schema fix.
8 min read· Mesrai Team
August 10, 2026Technical Deep DiveImage Component Without Width/Height: The CLS Score Mesrai Improves
Real PR catch: `<Image>` without dimensions — layout shift, CLS Web Vitals hit. Explicit width/height fix.
8 min read· Mesrai Team
August 9, 2026Technical Deep DiveNext.js redirect() Inside Render: The Suspense Boundary Trap
Real PR catch: `redirect()` inside JSX conditional after data fetch — interrupts render, breaks Suspense. Top-of-component placement fix.
8 min read· Mesrai Team
August 9, 2026Technical Deep DivedangerouslySetInnerHTML Without DOMPurify: XSS in Markdown Renderer
Real PR catch: marked output piped to dangerouslySetInnerHTML — stored XSS. DOMPurify fix + react-markdown alternative.
8 min read· Mesrai Team
August 8, 2026Technical Deep DiveContext Provider Below Consumer: Why Mesrai Flags Order
Real PR catch: consumer rendered above its Provider — useContext returns default forever. Provider-above-consumer fix.
8 min read· Mesrai Team
August 8, 2026Technical Deep DiveuseEffect Cleanup Never Runs: The Subscribed Listener Leak
Real PR catch: `window.addEventListener` in useEffect with no cleanup — listener stacks per remount. Cleanup fix.
8 min read· Mesrai Team
August 7, 2026Technical Deep DiveuseRef Without .current: A Live Mesrai Trace
Real PR catch: `inputRef.focus()` instead of `inputRef.current?.focus()` — TypeError on mount. Optional-chain fix.
8 min read· Mesrai Team
August 7, 2026Technical Deep DiveServer Component Importing Client Hook: The Boundary Bug
Real PR catch: server component using useState. Build error. Split into client child fix.
8 min read· Mesrai Team
August 6, 2026Technical Deep DiveHydration Mismatch from Date.now() in Server Components
Real PR catch: `Date.now()` in a server component — server/client times differ, hydration warning. Client-only render fix.
8 min read· Mesrai Team