A desktop seat keeps the token it was signed in with, saved on its own record through client.auth.set. It reads the app only to pick up a newer token for the same account. sameAccount requires the read token to carry the seat's uid, so a token without a uid, or with another account's uid, is never used for the seat. Before this, a seat could be billed to the app's current account, and report that account's credits, without anything saying so (#166). The README says what the change guarantees, and that the vendor revokes the previous account's session when the app signs in to another (#166's measurement). The registry summary is back to main's text. Version 0.1.3.
Run at the reviewed head 639da69 (origin/main 532e738):
- packages/raccoon: HOME=<temp> bun test gave 36 pass, 0 fail. bun scripts/check.mjs: all 21 packages pass.
- Broken by hand at b64dc95, each turning a test red: a uid-less read token agreeing (1), desktopSignIn storing access "" (3), no write-back (1), using the app's token for another account (5), ignoring the seat's own expiry (1).
- Broken by hand at 639da69, for the revoked-seat test: the loader retrying a desktop 401 with the app's token (red), and a desktop 401 reported as kept (red). With usage falling back to the app's token on a 401, it stays green, because the stub refuses every token. Other tests cover usage on the normal path (user=AccountA).
Not tried: a real Raccoon desktop app with two accounts. No real accounts were used.