feat(service,host): a live read names its account; another's session is signed out

Merged
LU
4h ago
+236-44

Each live read now names the account it was started for, and a session of any other account is treated as signed out. This follows Neon's guide ("When the session changes"), rebased onto main without the Realtime-only shared socket.

  • Contract and service: every live procedure on main takes ?userId= (LIVE_USER_QUERY) and checks it first (sameUser): inbox, task board and agent transcript, and through them #4272's held polls. A session of any other account, or a read that names none, gets the same 401 as no session.
  • Clients: boardLive and agentTranscriptLive send the account and read that 401 as signed-out (LIVE_SIGNED_OUT).
  • Host: the board and transcript follows capture the account when they start and name it on every seal and poll. On signed out, liveRows ends the read instead of sealing or polling it again. The board's retry stops, and so does the transcript's reseal.

Tests:

  • Service: a mismatched or missing account gets 401, on a seal and on a poll.
  • Client: the board's live read sends the account and reads 401 as signed out.
  • Host: liveRows ends on signed out.