pub async fn serve_transcript_socket(
socket: WebSocket,
state: &ServerState,
caller: &CallerIdentity,
subscription: &TranscriptSubscription,
) -> Result<(), ServerError>Expand description
Serve a transcript subscription on an already-upgraded socket.
Flow: decode + namespace-gate FIRST (anti-leak: a denied caller receives one
terminal wire-error frame + close, byte-identical to the workflow path); then
attach the live broadcast BEFORE reading the durable O tail (gap-free
splice); replay the durable tail; forward live events until the client closes
or the subscriber lags (one typed transcript_lagged frame then close).
ยงErrors
Returns ServerError when decode/authorization fails (after the terminal
frame is sent), the durable replay read fails, or the stream ends with a lag
terminal frame.