grpcerr/v1.1.5
Documentation and tests only — no code change (external review round 6).
- Docs External review round 6 (measured over bufconn): an invalid-UTF-8
public message sits outside v1.1.4's per-detail isolation — it lives on
the Status proto itself, so the transport cannot marshal the
grpc-status-details-bin trailer and the client receives code+message but
zero details (custom-code recovery degrades to the numeric wire code;
only grpclog sees the failure).ToStatusdocuments the hazard and the
utf8.ValidStringguidance;FromErrorwarns that the wire message can
carry raw non-UTF-8 bytes, so echoing it unvalidated intoWithPublic
poisons your own response's details. Guarding it in code was considered
and rejected (ROADMAP): the trailer is the transport's to build, and
rewriting the message would be silent mutation. - Tests A standing test pins both halves of the mechanism: the
in-process attach succeeds (3 details) whileproto.Marshal(st.Proto())
fails on the poisoned message — so a grpc-go/protobuf change altering
either half is noticed.