feat(xmtp_api_grpc): bidi_stream transport primitive#3770
Conversation
|
Claude finished @tylerhawkes's task —— View job Code Review - June 24, 2026 20:31 UTC
FindingsCode Quality & Best Practices ✅
Potential Issues
Performance & Security ✅
Test Coverage
Minor Nit
Summary: Solid implementation with no blocking issues. Main concerns are code duplication and test coverage, both addressable in follow-ups if needed for this stack. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3770 +/- ##
==========================================
- Coverage 84.44% 84.43% -0.02%
==========================================
Files 408 408
Lines 59880 59904 +24
==========================================
+ Hits 50567 50578 +11
- Misses 9313 9326 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5329964 to
ba3c4de
Compare
2a66968 to
5030100
Compare
ba3c4de to
cf43cdd
Compare
5030100 to
9eb4ed4
Compare
cf43cdd to
7ef18f0
Compare
9eb4ed4 to
21b315c
Compare
…#3769) **Stack 1/4** of the XIP-83 bidi client lane: #3769 → #3770 → #3771 → #3772. Regenerated `xmtp.mls.api.v1` from xmtp/proto#337: the bidirectional `Subscribe` RPC with versioned `SubscribeRequest`/`SubscribeResponse`, id-based `Mutate` (cursors, `history_only`), `Ping`/`Pong`, `TopicsLive`, `CATCHUP_COMPLETE`, and STARTED `capabilities`. Purely additive (+1,896 generated lines); `proto_version` pinned to that branch's sha — draft until the proto PR merges.
7ef18f0 to
af6ab11
Compare
…efault-unsupported elsewhere) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
af6ab11 to
74f05a8
Compare
ApprovabilityVerdict: Needs human review This PR introduces a new bidirectional streaming transport primitive (XIP-83), adding new capability to the Client trait. While well-scoped and authored by the code owner, new transport infrastructure warrants human review to validate the design and integration approach. You can customize Macroscope's approvability policy. Learn more. |
#3771) **Stack 3/4** of the XIP-83 bidi client lane: #3769 → #3770 → #3771 → #3772. Native-only `XmtpMlsBidiStreams` trait in `xmtp_proto::api_client` — `subscribe_bidi(BoxStream<SubscribeRequest>) -> Stream<Result<SubscribeResponse>>` — and its `V3Client` implementation: prost-encode outbound frames over `bidi_stream("/xmtp.mls.api.v1.MlsApi/Subscribe")`, decode inbound via the existing `XmtpStream`. Browsers stay on `XmtpMlsStreams` + watchdog (gRPC-Web cannot full-duplex). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Stack 2/4 of the XIP-83 bidi client lane: #3769 → #3770 → #3771 → #3772.
Adds one primitive to the protocol-agnostic
Clienttrait:bidi_stream(request, path, BoxDynStream<Bytes>) -> http::Response<BytesStream>— outbound stream of encoded protobuf messages in, inbound message stream out. Default implementation errors ("not supported by this transport"), so gRPC-Web/wasm and mocks are untouched; forwarded through the&T/Box/Arc/boxed-client impls.GrpcClientoverrides it natively via tonicGrpc::streaming+ the existingTransparentCodec, reusing the NonBlocking stream machinery verbatim.build_tonic_requestmade generic over the body type.🤖 Generated with Claude Code
Note
Add
bidi_streambidirectional streaming transport primitive toGrpcClientbidi_streamto theClienttrait in traits.rs with a default implementation that returns an unretryable error, so existing transports don't break.bidi_streamonGrpcClient(non-wasm only) in client.rs, sending an outboundBoxDynStream<Bytes>and returning an inboundBytesStreamover HTTP/2.build_tonic_requestgeneric over the body type to support both unary/server-streaming (Bytes) and bidirectional (stream of frames) use cases.bidi_streamthrough blanket impls for&T,&mut T,Arc<T>, andBoxedClient<C>.Macroscope summarized 74f05a8.