Ratchets: Build Limits That Only Tighten
Floors catch a collapse, not a slow slide. Ratchets for bundle size, coverage and docs, the tree-shaking bug one caught, and the escape hatch they need.
Testing a Reconnect Ladder: Assert the Climb, Not the End State
A client that gives up at once and one that retries forever both pass an end-state reconnect test. Here's how to test the retries themselves, and why the test went red on a Mac.
SKIP LOCKED: Claim the Next Job in One Statement, Then Test It on Real Postgres
Claiming queue work with one FOR UPDATE SKIP LOCKED statement, and why that forces your tests onto a real Postgres with cloned template databases.
Postgres as Your socket.io Scale-Out Bus, and Why It Needs Its Own Pool
Fan out realtime events across server instances with Postgres LISTEN/NOTIFY instead of Redis, without letting the adapter break your pool sizing, your tests, or your large broadcasts.
Dependencies That Hang Are Worse Than Dependencies That Fail
A queue that silently hung on a misconfigured Redis connection, a dashboard one dead host could freeze, and the fix for both: deadlines, serve-first startup and visible health.
Don't Let the LLM Name Your Entities
An LLM called one credit card three different names and my app created three accounts. Use model output for meaning, never for identity: key records on facts the model copies, not labels it writes.
Design the Image the Model Sees, Not Just the Prompt
Vision models shrink what you send them. For an AI photo-culling tool, the real work was building a composite image the model can actually judge.
Offline Sync Without Lost Edits: Stale-Write Triggers and Partial Unique Indexes
Order conflicts by when the edit happened, let a Postgres trigger drop stale writes, keep balances in a ledger, and make 'only once' a partial unique index.
Green Tests, Broken LLM: Five Things the First Real Model Call Exposed
Mocks repeat your assumptions back to you. Five integration failures that only appeared on the first real LLM call, and the smoke test that catches them.
Realtime Events Should Invalidate the Cache, Not Carry State
Let socket events say what changed and let the server say what it is now: one projection, no client drift, and a polling fallback that is the same code path.