Writing
Notes on distributed systems, AI tooling, and the engineering decisions behind them. Each post is one decision worked through, with the wrong first guess left in.
Lines
- Protocols and auth5
- Architecture and data6
- AI tooling6
- Practice and process4
- Infrastructure3
- I measured my AI code reviewer instead of guessing, and most of my intuitions were wrong
I gave my LLM code reviewer tools to explore the codebase. Nearly every measure got worse.
- A schema change with no migration and no cleanup ticket
A decade of code reads two fields I needed to move, and some of it ships in a browser extension I cannot patch. So I never moved them.
- Five narrow reviewers beat one broad reviewer
One reviewer asked to check five things stopped after three findings. Five reviewers with one job each found 38% of the known defects instead of 24%.
- A week of agent work, measured
I parsed a week of my own coding-agent transcripts. Cache reads were 97.7% of the volume, and the built-in cost meter was blind to a fifth of the work.
- We derived the arrow backwards
Our derived architecture graph said a Lambda was triggered by a queue it only writes to. The obvious fix, reading IAM grants, was wrong in both directions.
- The permission you did not know you granted
Adding one boolean to an old permissions table also handed out write access to every customer account. The upsert was the part nobody would review.
- Building MCP tools that do not time out
A feature-flag question looked like a one-endpoint job. It ended up teaching me why MCP tools need a different design from HTTP APIs.
- Every dependency edge is a claim, so make it carry its evidence
Our service catalog claimed a front-end monolith called a Lambda that cannot receive HTTP requests. The fix was to trust production traces less.
- Two MCP servers, because the network is the boundary
Adding internal tools to our public MCP server looked like an authorization problem. It was a question about where the calling code runs.
- Everything was green and nothing was working
Queue depth zero, Lambda errors zero, no alarm firing, and the pipeline running 26 minutes behind the whole time.
- Durable execution is the missing runtime for AI agents
I built the same three-week agent workflow five times. A replay engine's strictest rule was exactly the guarantee the model call needed.
- The connection math nobody does before putting Mongo behind Lambda
Our Mongo cluster hit its connection ceiling under Lambda load. Two of its three nodes sat idle the entire time.
- Is the box stopped, or is it wedged?
A powered-off machine and one thrashing on full swap look identical from outside. Two commands tell them apart, and ping is not one of them.
- A confirmation token cannot prove consent
The model reads every byte your server returns, including the confirmation token. Here is what a two-step handshake on a destructive tool call actually buys.
- Your test client is not a client
Five stacked OAuth bugs, three of them hiding behind one symptom, and not one of them visible from a unit test, a curl command, or a laptop on the VPN.
- The trajectory we wrote down and never scored
We wrote the expected tool-call sequence for every eval scenario, captured the real one at runtime, and then graded only the final answer.
- Four agent SDKs, one feature, and the line of code none of them deleted
We built the same six-tool agent four times on four SDKs. They differed where it was cheap and converged where it hurt.
- Three scoring runs, three winners, and the criterion that actually decided it
We scored seven agent SDKs three times and got three winners. The framework we chose ranked third on a criterion weighted at 2%.
- Four months and 354 comments
Two files changed, 354 comments, four and a half months to merge. What a 2,799-line design document bought, and the thing it still got wrong.
- A third of my pull requests never merged
I opened 133 pull requests against Kibana and 44 closed unmerged. I read every one to find out why, and only two were abandonment.
- Changing a schema you cannot migrate
A boolean became an object in software customers host themselves, where no migration ever finishes and the old field has to keep answering forever.
- Put the test plan in the repository
A test plan I moved out of Google Docs and into the repo drew 112 review comments in eight days, which is 112 more than it ever got as a doc.
- Three-way merge for things that are not text files
Let users edit content you also ship updates for and you have signed up to build git merge, where the unit is a record with forty typed fields.
- Thirty-five pull requests against flaky tests
Nine of my thirty-five flaky-test pull requests in Kibana were never meant to merge, and one shared helper had been swallowing every error for months.