Why Adding a Junction Table Is Only Half the Work
When you bolt a junction table onto a legacy singular FK, your schema is multi-entity. Your validation logic? Still isn't. Every constraint that rea
A lab notebook: what I'm learning while building with AI, written as I go.
When you bolt a junction table onto a legacy singular FK, your schema is multi-entity. Your validation logic? Still isn't. Every constraint that rea
Every layer of a modern web stack — Postgres on Supabase, Node on Vercel, the Zoom API, JS date parsing — defaults to UTC. If your business runs on Ea
=== short-circuits on the first mismatched byte — an attacker can probe your secret byte-by-byte using response timing. timingSafeEqual from Nod
An HTTP 200 from an LLM API tells you the request arrived. It says nothing about whether the model finished. Always check stopreason and cont
Supabase auto-enables RLS on every new table. Without a policy, Postgres returns zero rows — silently. The fix is one line, but only after you've st
If your code fetches a URL that came out of a third-party response header, validate the hostname against an allowlist before making the request. Eve
When you retrofit Tailwind v4 onto an existing interactive app, split your CSS into two buckets — authored @layer components for anything JS touch
The platform's liveness probe and your external uptime monitor need different endpoints. Bolt deep checks onto the wrong one and a dead API key will
I escaped the message body in my AppleScript iMessage bridge. I didn't escape the recipient handle. They're both interpolated into the same string. Same
the setup
When a server mutation fails, calling mutate() to revalidate your SWR cache isn't optional. Skip it and your UI silently shows the user a state th
Transient API failures are guaranteed at scale — it's just math. Retry logic isn't a nice-to-have. And don't advance your watermark on a failed batc
PostgREST's PGRST201 isn't just a loud crash — it can be a perfectly silent one. Here's how that happened to me, and the two-line sweep that catches
Poll your live data fast. Cache the LLM's ranked order separately. Invalidate the cache on an explicit trigger — not on every data change.
Pull the LLM into a scheduled ingest job. Let the runtime be dumb and fast. Bonus: the Claude Agent SDK runs on your subscription — zero metered billing
I ran a full audit on two production Next.js apps and found 12 of 24 server action files were passing raw form data straight to Postgres. Zero Zod.
If you're doing multi-table writes as sequential supabase-js calls, one mid-loop error leaves your database in a broken half-state. Push it into a
FIFO lot depletion + cron retries = potential double-depletion. Fixed it with a DB-enforced partial unique index keyed to the snapshot date. Ran the
Some destructive-but-bounded operations are legitimately 'traced-only' — not because you were lazy, but because that's the honest shipping posture. The
I wanted a fast local model ranking my tasks. The runtime had to stay pure stdlib. The answer was a sidecar in its own venv — and the real lesson was: b
When building an attention gate with an LLM, fail-closed beats fail-open. Precision is the differentiator — not recall.
Grep finds the word you typed. RAG finds what you meant. Neither alone was enough — and fusing them costs almost nothing extra.
When Anthropic moved Agent SDK usage off the Claude Max subscription onto a metered credit pool, I had one day to rethink the email triage in Apollo
If your sync watermark advances before a batch fully commits, you have a silent data-loss trap. Freeze it until the whole batch is done.
If your plan's justification is 'this should be faster,' benchmark that claim FIRST — before building anything around it.
Fields starting with =, +, -, or @ in a CSV import aren't just strings — they're deferred spreadsheet formulas. Inert in your database, harmless
Every LLM that touches ingested content — at chunking time AND at synthesis time — is holding untrusted input. Don't paste documents into your instr
Vercel hard-caps request bodies at 4.5MB at the platform level. bodySizeLimit in next.config can't touch it. Fix: send one file per request.
A QuickBooks MCP server caches its access token at boot. Access tokens expire in ~an hour. Long sessions die silently. The fix: refresh per call, not pe
On iOS Safari, 100vh is taller than the visible screen. Use 100dvh instead. One unit, one fix.