mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-02 00:06:58 +00:00
client_test.go reproduces the cancellation precisely, but in-process against an httptest PDS. The failure this range fixes — mass sign-outs — happened against a real one, through the real refresher and the real oauth_sessions row, so the unit tests alone are a thinner sign-off than the batch deserves. Staling the access token in the live row and restarting the appview (the refresher caches sessions in memory, so editing the DB alone changes nothing) forces the real refresh path. Four concurrent pulls then advance rev 1 to 3 rather than 1 to 4: the compare-and-swap collapses four racing refreshes into two rotations, with the losers adopting the winner's token instead of each burning one. Killing a pull 150ms into that window and retrying still succeeds. Backs ui.db up first, since a burned refresh token would otherwise leave the account signed out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>