For agents, on top of README.md, which they read first.
- The suite's invariants are one folder up, in
tests/CLAUDE.md. - Start instances only through
TestPostgres. Its PDEATHSIG is what makes teardown leak-proof; never spawnpostgresanother way. - Never give an instance a TCP port. It listens on a Unix socket in its own temp dir: a port picked by binding 0 and releasing it can be taken by another process before the server binds it.
- Several instances at once go through
TestPostgres::start_all. Taking slots one at a time is hold-and-wait: threesidecar_clitests on 3 cores each held one slot and waited for another until buck killed them at 10 minutes (2026-09-27). A secondstarton a thread that already holds a slot panics on purpose. - The slot directory is fixed (
/tmp/postjevsql-test-slots-<uid>), nottemp_dir(), so every worktree's daemon and every test sandbox share one set of slots. gates.rsis the one copy of what the gates ask. A replay matches by exact request bytes, so changing its rows, question or SQL breaks everygate_*test until the fixtures are re-recorded.