Cross-process suite for the two refusals a WebSocket request can meet ahead
of dispatch — the same on both spines, pinned over a real upgrade:
- a request whose id names a request still running on the socket is
answered
invalid_request with data.reason: 'duplicate_request_id' and
not dispatched; the running request keeps the id and answers as usual, and
once it has answered the id is free again - past the per-socket in-flight ceiling (128 on both spines) a new request is
answered
queue_overflow with its id and not dispatched; the socket stays
open, the running requests still answer, and the duplicate check comes
first
A request has to stay in flight for either to be observable, so the suite
holds requests with peer/ping: the server's handler pings the client back
and waits for the echo, and the client's responder withholds it until the
test releases it. Gated on capabilities.peer_request for that reason.
The wire literals are deliberate independent copies of the producers'
constants (ERROR_DUPLICATE_REQUEST_ID,
MAX_INBOUND_DISPATCHES_PER_CONNECTION, WS_INBOUND_DISPATCH_OVERFLOW_MESSAGE
on TS; their Rust twins in fuz_realtime) — parity by test, so a value
renamed on one side fails here instead of moving both at once.
Cross-process only: create_ws_transport needs a real bound socket, so wire
it from a *.cross.test.ts file.