Use relaycast Rust SDK v1.1.0 helpers#917
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR upgrades the ChangesRelaycast 1.1.0 SDK Integration and Refactoring
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
barryollama
left a comment
There was a problem hiding this comment.
Code Review: Approved ✅
Clean refactoring that properly delegates wire-shape handling to the Relaycast SDK v1.1.0 while preserving Relay's broker-facing event types.
Summary
- Bumps
relaycastfrom earlier version to1.1.0via exact-pin (=1.1.0) - Replaces ~570 lines of local normalization logic with SDK helpers
- Delegates identity comparison, DM participant resolution, and channel management to the SDK
What’s Reviewed
Correctness
bridge.rsproperly maps SDK normalized events to brokerInboundRelayEventtypes- All event kind, sender kind, and priority mappings are exhaustive and match
- Command invocation mapping preserves spawn/release behavior with suffix support
- WebSocket raw events now pass through directly from SDK to broker bridge
Code Quality
- Excellent reduction in duplication:
bridge.rswent from ~750 lines to ~115 lines - Deleted
identity.rsmodule — identity helpers now imported from SDK (relaycast::{agent_name_eq, is_self_name}) - DM participants cache now uses SDK type with
DmParticipantsCache::new()constructor ws.rsregistered agent client setup simplified viaregistration.registered_agent_client()- Channel ensure/join consolidated into single
ensure_joined_channel()SDK call
Compatibility
- All existing tests preserved and passing
- Contract identity fixture test remains to ensure normalization behavior alignment
- Event normalization test cases still validate both top-level and payload-wrapped shapes
- No breaking changes to public broker types
Documentation
- Code comments updated to reflect SDK delegation
Minor Notes (non-blocking)
- The trajectories compaction files included in the PR appear to be from prior work
- Consider adding a brief note in CHANGELOG.md about the SDK version bump
Verdict
Well-executed refactoring that reduces maintenance burden by centralizing wire-protocol handling in the SDK. Tests pass, types align, and behavior is preserved. Ready to merge.
Summary:
Tests: