Plain asyncio.gather on one event loop could let the first upload commit before the second's pre-check, making the second a legitimate replace (2 successes, 1 live row) -- correct behavior that fails the '1 conflict' assertion. Same Event-synchronization pattern as the auto's HTTP race tests: hold the first past its pre-check until the second also pre-checks, so both read None before either writes and the partial-unique index decides deterministically. Code under test untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>