Skip to content

.blog

30 posts. notes from production, and the occasional deep dive.

12 min read16 min listenfeatured

The outbox pattern without a relay

The transactional outbox solves the dual write problem and hands you a second one: a relay service you have to deploy, watch and keep pointed at the right database. ulak moves the relay into PostgreSQL as background workers. This is how it claims, delivers and recovers, and the trade it asks you to accept for that.

.2026

29 posts, newest first.

Hybrid search with pgvector got worse until I added BM25

The hybrid query most tutorials show, Postgres full-text search fused with pgvector, scored worse on two public benchmarks than vector search alone. With a real BM25 index as the keyword half, the same fusion gave the best result I measured, in under 3 ms a query. Here are the numbers for seven ways to search, and the query shapes that made the fused one 15 times slower until I found them.

postgresqlsearchrag+2 more
18 min read20 min listen

TypeSafe's Jev in production: thresholds and two bugs

Jev is a decision model: it picks, rates and judges, and writes nothing. I wired it into ten places on this site and measured what it cost. The model was the easy part. The hard part was choosing a threshold for each decision, giving moderation a token budget nothing else can spend, and finding out the counter meant to cap the whole thing had never counted anything. These are the eleven thresholds, the two bugs, and the rule I kept.

llmai-agentsarchitecture+2 more
19 min read24 min listen

How I turn any handful of colours into a readable theme

This site ships 18 hand-made themes and 368 base16 schemes. When I measured them, 16 of the first and all 368 of the second broke basic rules about contrast and colour. I wrote the rules down as code, built an engine that repairs a palette with the smallest change it can find, then pointed it at random colours. This is how it works and where it stops.

cssaccessibilitydesign-systems+2 more
17 min read20 min listen

How camouflage.nvim masks secrets in Neovim without leaking a frame

In Neovim, a pasted secret can reach the screen for one frame before the mask catches up, and a recording keeps that frame. I measured what cloak.nvim, shelter.nvim and camouflage.nvim draw while you type and paste, what they cost, and which files they can read.

neovimluasecurity+2 more
11 min read12 min listen

Upgrading PostgreSQL 16 to 18 with zero downtime: the whole runbook

A major version upgrade with a write pause you measure in seconds, instead of an outage you measure in hours. The plan, the preflight queries that catch what will bite you, building the new cluster from a standby with pg_createsubscriber, the sequence trap, schema changes during the window, the cutover script through PgBouncer, a rollback you can actually take, and what PostgreSQL 19 removes from this list.

postgresqldatabaseoperations+2 more
16 min read21 min listen$2.00

Selling a blog post with x402, and everything the quickstart leaves out

A working x402 paywall on a Next.js blog, from the 402 header to the settled USDC: what the protocol really sends, which facilitators settle on mainnet, the three things that break in a browser and the signed cookie plus one line of JavaScript that fix them, and the leaks you have to close before you charge anyone.

x402paymentsnextjs+2 more
12 min read15 min listen$0.01

Letting an agent touch production

Over five months we gave an agent access to production on-call in stages: read only, then propose, then act on a short list, then act on a longer one. Each stage had to prove a specific thing before the next. The rules that came out of it fit on a page, and they aren't the ones I'd have guessed at the start.

sreai-agentson-call+1 more
8 min read10 min listen

The npm worm playbook for a small team

Three self-propagating npm campaigns in twelve months: the TanStack compromise in May, ChainDrop through keyv in August, 400 plus packages backdoored from one stolen token. Auditing won't get you out of this. These are the controls that actually stop a worm at the door, with the config for each.

securitynpmsupply-chain+1 more
8 min read9 min listen

Just use Postgres, until it actually hurts

The queue, the cache, the search index, the vector store, the job scheduler and the analytics table for a product with 40,000 daily users all live in one Postgres 18 instance, and that was the plan from the start. Here's what each piece looks like, what it costs, and the three specific signals that would make me move one of them out.

postgresqlarchitecturedatabase+1 more
8 min read10 min listen

The code nobody read

A client asked me to take over a product two people and an agent had built in four months. It worked. It was sixty thousand lines, no human had read most of them, and the first bug took a week to find because there was nobody to ask. This is what inheriting vibe coded software is like, and what I'd have done differently in those four months.

ai-agentsengineering-practicemaintenance+1 more
9 min read12 min listen