create_account built the signing_key id as sk-, so two createAccount calls landing in the same millisecond produced the same id. The second insert failed on the primary key and the request returned 500 InternalError with its account transaction rolled back.
The id is now sk-. Tid::new is monotonic within the process and carries microsecond time plus a random clock id across processes. A DID-derived id was the other candidate. It was rejected because signing_key rows outlive their account row (the cascade went with the foreign key in 20260826000001), so a DID created again would collide with its own leftover. The sk- prefix stays, and existing rows keep their ids.
Adds a test that runs 32 create_account calls concurrently and requires 32 distinct signing_key ids. Against the old id it failed in 2 of 3 runs with the reported UNIQUE constraint error.
Reported as https://tangled.org/ngerakines.me/atproto-crates/issues/6
Kata: atproto-crates#cv9h