proptest-driven round-trip for a representative struct:
encode(value,&mutbuf) followed by decode(&buf[..len])
yields a value equal to the original under every shrunken input.
Runs against JsonCodec; will be parameterised over
MsgPackCodec and ProtoCodec once those land.
Test Case: Codec encode error on undersized bufferTEST_0111
Encoding a value larger than the provided buffer returns
ConnectorError::PayloadOverflow{actual,max} so the
buffer-exhaustion path is distinguishable from genuine serializer
faults at the codec layer. Other serializer failures (NaN
floats with strict configuration, non-string map keys, etc.)
surface as ConnectorError::Codec carrying the codec’s static
format_name() and the underlying serializer error chain.
Routing buffer-overflow to PayloadOverflow keeps the codec
layer consistent with Outbound bridge saturation ... (REQ_0323) and Payload-overflow rejection (TEST_0125) —
buffer exhaustion is always the same variant regardless of which
layer detects it.
Test Case: Codec decode error propagationTEST_0112
Receiving a payload that fails decode<T> (e.g. truncated JSON,
wrong shape) surfaces as ConnectorError::Codec from
ChannelReader::try_recv rather than silently dropping the
envelope.