Skip to content

feat(xmtp_proto): XIP-83 Subscribe protos (bidi mutable subscription)#3769

Merged
tylerhawkes merged 1 commit into
mainfrom
tyler/xip83-1-subscribe-protos
Jun 16, 2026
Merged

feat(xmtp_proto): XIP-83 Subscribe protos (bidi mutable subscription)#3769
tylerhawkes merged 1 commit into
mainfrom
tyler/xip83-1-subscribe-protos

Conversation

@tylerhawkes

@tylerhawkes tylerhawkes commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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.

🤖 Generated with Claude Code

Note

Add XIP-83 bidirectional subscribe protos to MLS API v1

  • Adds SubscribeRequest and SubscribeResponse proto messages implementing XIP-83 bidirectional mutable subscriptions, including nested types for Mutate, Ping/Pong, Started, Messages, TopicsLive, and CatchupComplete.
  • Extends the MlsApi server trait with a new bidirectional streaming subscribe method and server-side routing for /xmtp.mls.api.v1.MlsApi/Subscribe.
  • Adds serde implementations for all new types, encoding bytes fields as base64 and supporting both snake_case and camelCase field names.
  • Updates the pinned proto descriptor hash in proto_version.

Macroscope summarized 21b315c.

@claude

claude Bot commented Jun 12, 2026

Copy link
Copy Markdown

Claude finished @tylerhawkes's task —— View job


Code Review Complete ✓

Reviewed on: 2026-06-15 20:22 UTC

This PR adds XIP-83 bidirectional Subscribe RPC protos - purely generated code from xmtp/proto#337. The changes look solid overall for generated protobuf code.

Summary

Code Generation: The generated Rust code follows standard prost patterns correctly - proper derives, name implementations, and type URLs.

API Design: The new bidirectional Subscribe RPC is well-structured with:

  • Versioned request/response envelopes (V1)
  • Mutable subscription via Mutate (add/remove topics with cursors)
  • history_only mode for bounded catch-up
  • Ping/Pong keepalive mechanism
  • TopicsLive and CatchupComplete markers
  • Started frame with capabilities negotiation

Proto Version: Pinned to ac2aa57f7482e354b1903f562203169eb1cc479f from the proto branch - appropriate for draft status until xmtp/proto#337 merges.

Key Points

No issues found. The generated code is clean and follows expected patterns for prost-generated types.

Integration Notes (for downstream PRs #3770-#3772):

  1. The Mutate.Subscription.id_cursor field (line 825) uses u64 - ensure client code handles cursor bookkeeping correctly, especially the seeding from WelcomeMetadata.message_cursor mentioned in comments
  2. The bidirectional stream signature at xmtp.mls.api.v1.rs:1409-1412 uses tonic::Streaming<SubscribeRequest> input - client implementations will need proper stream management for mutable subscriptions
  3. The history_only flag (line 805) combined with half-closing enables sync mode - ensure this boundary condition is tested in integration
  4. Server keepalive_interval_ms (line 927) requires client-side timeout/reap logic

Coverage: Codecov shows 84.46% coverage with no regression - appropriate since this is pure proto generation without logic yet.


Files reviewed:

  • crates/xmtp_proto/proto_version:1
  • crates/xmtp_proto/src/gen/xmtp.mls.api.v1.rs:765-1103 (Subscribe structures)

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.44%. Comparing base (8ad390a) to head (21b315c).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3769      +/-   ##
==========================================
- Coverage   84.45%   84.44%   -0.02%     
==========================================
  Files         408      408              
  Lines       59772    59880     +108     
==========================================
+ Hits        50483    50567      +84     
- Misses       9289     9313      +24     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…+ ping/pong + TopicsLive)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tylerhawkes tylerhawkes force-pushed the tyler/xip83-1-subscribe-protos branch from 9eb4ed4 to 21b315c Compare June 15, 2026 20:20
@tylerhawkes tylerhawkes marked this pull request as ready for review June 16, 2026 19:59
@tylerhawkes tylerhawkes requested a review from a team as a code owner June 16, 2026 19:59
@macroscopeapp

macroscopeapp Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Auto-generated protobuf definitions adding new Subscribe RPC types for XIP-83. All files are generated code owned by the author, and changes are purely additive interface definitions with no runtime behavior impact in this codebase.

You can customize Macroscope's approvability policy. Learn more.

@tylerhawkes tylerhawkes merged commit 1e1a195 into main Jun 16, 2026
46 checks passed
@tylerhawkes tylerhawkes deleted the tyler/xip83-1-subscribe-protos branch June 16, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants