naco-api/internal/bluesky
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nacorid 98a6bed466
fix: eliminate Bluesky session-refresh data race
read/write race on xrpc.Client.Auth: Do() reads client.Auth unlocked while
refreshSession mutated AccessJwt/RefreshJwt in place (only refreshMu serialized
refreshes, not concurrent request readers).

- add authMu RWMutex; every request now uses a clientSnapshot() copy that pins
  the current AuthInfo under the read lock, so requests never touch Auth directly
- refreshSession replaces client.Auth with a fresh immutable AuthInfo under the
  exclusive lock instead of mutating the old one in place
- remove the now-obsolete 'benign race' comment; lock order refreshMu -> authMu
2026-09-10 09:54:56 +00:00
..
client.go fix: eliminate Bluesky session-refresh data race 2026-09-10 09:54:56 +00:00
client_test.go fix: harden Bluesky client caching, auth refresh, and limits 2026-09-09 23:17:51 +00:00