The background login thread now flips _auth_state to authenticated itself when a slow tokenstore resume succeeds after the 10s wait -- previously its result landed in an abandoned private queue and the docstring's promised late recovery never happened, leaving every subsequent call failing until an explicit authenticate. Guarded to only ever transition from unauthenticated, so an explicit authenticate/MFA flow that took over meanwhile is never clobbered; the timeout branch no longer re-writes the state (a redundant write that could race a success at the boundary). Structured-log messages reworked alongside. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
15 KiB
15 KiB