Expand description
The sign-in of each account as its credentials file says now, not as the store last recorded it.
The storeβs status is written at a spawn, and by the credential watch only when a file is
emptied, and the watch needs two looks. A file emptied since the last spawn left the store at
valid: the account list showed a sign-in a restart would find dead, and a switch moved an agent
onto it. Every read that decides where an agent may go reads the file again.
ConstantsΒ§
- REREAD_
GAP π
FunctionsΒ§
- identity_
list π - Every account on this machine, statuses read now. BLOCKING (store and file reads).
- refreshed π
accountswith each status read from its file now.- status_
after π status_now, with what happens between the two looks given (a pause, in production).- status_
now π accountβs status read from its credentials file. Only what the file proves moves it: no token in it isneeds_reauth, and a live token turns a storedexpiredback tovalid. A lapsed access token with a refresh token is left as stored, because the CLI renews it by itself and the file cannot say whether that will work.invalid(a provider refusal),needs_reauthandunknownare not re-read, and an account the file cannot speak for (no config dir, a Keychain on macOS) keeps the stored status.