Writers lock their group only, so two groups' batches can number the same identity key at once (a spam post crossposted to 67 groups: duplicate key ...:65, HTTP 500, the batch retried). Releases are now inserted with ON CONFLICT (release_key) DO NOTHING, and those skipped take the next number (up to 20 tries). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>