feat(a2a-nats): add client routing infrastructure for per-operation methods - #334
Conversation
yordis
commented
Jun 18, 2026
- Eleven per-operation client methods share the same prefix, operation timeout, and gateway-ingress subject remapping, so the shared scaffolding belongs in one PR rather than duplicated piecewise across each operation.
…ethods Per-operation client methods all need the same prefix, operation timeout, and gateway-ingress subject remapping; landing the shared scaffolding first means each per-op PR is just the method body and its wire test. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
PR SummaryMedium Risk Overview
Unit tests cover defaults, timeout clamping, ingress toggling, subject remapping, and prefix access. Reviewed by Cursor Bugbot for commit 92c5d48. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Warning Review limit reached
More reviews will be available in 52 minutes and 8 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough
ChangesA2aClient prefix and timeout refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Code Coverage SummaryDetailsDiff against mainResults for commit: 92c5d48 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rsworkspace/crates/a2a-nats/src/client/handle.rs`:
- Around line 54-56: The `with_operation_timeout` method currently accepts any
Duration value including Duration::ZERO, which violates the factory pattern
correctness principle. Add validation in the `with_operation_timeout` method to
clamp the input timeout to at least the minimum supported timeout value (ensure
you reference the appropriate minimum constant). Apply the same validation to
the other timeout-related builder method mentioned at lines 136-146 to maintain
consistency between builder-based and config-based timeout setup and ensure
invalid instances are unrepresentable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6e4d8f6b-5b35-4e4b-ad0e-5c6578713b35
📒 Files selected for processing (1)
rsworkspace/crates/a2a-nats/src/client/handle.rs
Accepting Duration::ZERO would make every operation time out immediately; the floor keeps builder-based setup consistent with config-based. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>