feat(service,host): a live read names its account; another's session is signed out
Merged
LU
4h ago+236+236+012345678901234567890123456789-44-44-01234567890123456789
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
maintakes?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:
boardLiveandagentTranscriptLivesend the account and read that 401 assigned-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,
liveRowsends 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:
liveRowsends on signed out.