A Design for Running Agents Safely in Short-Lived Containers

I am moving the environment that runs agents from per-workspace VMs to Cloudflare Containers that start per job and stop afterwards. Following one job from start to stop, this post covers fencing off old containers (boot_id and CAS), work ownership, committing saves to R2, and draining before stopping, each compared with the common approach.

October 18, 2026 | 12 min

Preventing Lost Updates on Full-Text Saves with a Line-Level 3-Way Merge

When writers save by replacing a whole document, last-write-wins causes lost updates, and an optimistic-locking conflict error pushes the merge onto every caller. This post does a line-level 3-way merge on the server, using an immutable base snapshot and SELECT … FOR UPDATE.

October 9, 2026 | 5 min

Testing ON CONFLICT and SKIP LOCKED Takes a Real PostgreSQL

In a backend that writes SQL by hand, retry idempotency and double-claim prevention live inside ON CONFLICT and FOR UPDATE SKIP LOCKED, where a mocked database never looks. This post starts the production PostgreSQL version with testcontainers, applies the real migrations, isolates tests with TRUNCATE, and splits pytest into unit and integration lanes in CI.

July 8, 2026 | 12 min