Found during review of #96. ProtocolMessage::decode_error and ::call_error in rust/crates/truapi-server/src/frame.rs:35 return a ProtocolMessage with empty request_id and empty tag, relying on the dispatcher to 'overlay' both. The constructor name suggests it produces a usable wire frame; nothing in the type prevents a caller from transport.send(ProtocolMessage::decode_error(...)) directly, which would produce [0x00 empty-str compact-len][0xFF unknown-tag poison][err bytes] — a frame the peer must reject. Fix: return a plain Vec<u8> (encoded CallError bytes) from these constructors since that's all the dispatcher actually uses; the ProtocolMessage envelope is then built once at the dispatcher seam with the right request_id/tag.
Found during review of #96.
ProtocolMessage::decode_errorand::call_errorinrust/crates/truapi-server/src/frame.rs:35return aProtocolMessagewith emptyrequest_idand emptytag, relying on the dispatcher to 'overlay' both. The constructor name suggests it produces a usable wire frame; nothing in the type prevents a caller fromtransport.send(ProtocolMessage::decode_error(...))directly, which would produce[0x00 empty-str compact-len][0xFF unknown-tag poison][err bytes]— a frame the peer must reject. Fix: return a plainVec<u8>(encodedCallErrorbytes) from these constructors since that's all the dispatcher actually uses; theProtocolMessageenvelope is then built once at the dispatcher seam with the right request_id/tag.