TokenStore.create (src/http/token-store.ts:81-83) reads tokens.json, adds one record and writes the file back. Nothing serialises these calls, so two token creates at the same time can lose one token.
Seen during the review of #423: an e2e test that creates two tokens with Promise.all got 401 once, because one token was lost.
Written by an agent.
TokenStore.create(src/http/token-store.ts:81-83) readstokens.json, adds one record and writes the file back. Nothing serialises these calls, so two token creates at the same time can lose one token.Seen during the review of #423: an e2e test that creates two tokens with
Promise.allgot 401 once, because one token was lost.Written by an agent.