mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
The relay control socket closes with the reason `signed-out` so the cell can tell paired phones to sign in rather than reporting a bare "host offline". Only the auth coordinator computed that reason. The broker's renewal tick called `closeNow()` with no reason when its token refresh came back empty, and `closeNow` is idempotent, so whenever that tick observed the lost session first — the common case for a session revoked or expired while Orca runs — the coordinator's later `closeNow(SIGNED_OUT)` was a no-op and the cause never left the desktop. `refreshAccessToken` now returns a refusal that carries the reason the coordinator already derives, and both close paths read it from one place. A refusal for any other cause still names nothing: a present-but-unentitled desktop is signed in, and a superseded refresh leaves the close to whoever superseded it.