Retries Duplicate Your Writes, and Exactly-Once Won't Save You

When a request times out, the client cannot tell whether the request or only its acknowledgement was lost. This is why exactly-once delivery cannot be built, and why effectively-once processing is at-least-once delivery plus a receiver that deduplicates. A runnable experiment with a flaky network, the bug that still duplicates 89 of 200 requests, an atomic dedupe store, and a jitter simulation.

August 28, 2026 | 16 min

Behind NAT, the Machine Dials Out

When an agent lives on a machine that cannot open an inbound port, the server never connects to it. The machine reports liveness over short outbound HTTPS requests and fetches work with a separate one. Silence is kept apart from a stop, and the destination of a piece of work is fixed when it is submitted, so silence never moves it to another machine. Includes a minimal PostgreSQL version with a partial unique index and FOR NO KEY UPDATE.

August 3, 2026 | 8 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