actions/peer_request.ts view source
(log: Logger, connection_id: string & $brand<"Uuid">, id: string | number | null): void import {audit_unmatched_peer_response} from '@fuzdev/fuz_app/actions/peer_request.js'; Sampled, bounded audit for an inbound response that matched no pending request
on its connection — an unsolicited {id, result}, a cross-connection id echo,
or a late/duplicate reply for an already-settled id. Auditing every
rejected frame would let a junk flood turn the log into the DoS target, so
this warns on the first few then samples 1-in-256. Twin of the Rust
fuz_realtime::peer::audit_unmatched_response.
log
the WS dispatcher's logger
Loggerconnection_id
the socket the unmatched reply arrived on
string & $brand<"Uuid">id
the reply's echoed id (null when absent)
string | number | nullreturns
void