feat(a2a-nats-server): add default A2A agent binary - #363
Conversation
yordis
commented
Jun 20, 2026
- First of the three binaries from the upstream branch. The runtime is split: env parsing lives in a coverage-friendly lib path so validation logic is testable without a real NATS server; the connect-and-serve loop stays in main.rs gated to cfg(not(coverage)) because trogon-nats::NatsJetStreamClient is itself excluded under coverage.
First of the three binaries the upstream branch ships. Splits env parsing into a coverage-friendly lib path so validation logic is testable without a real NATS server, while the connect-and-serve half stays in main.rs gated to cfg(not(coverage)) because trogon-nats::NatsJetStreamClient itself is excluded under coverage instrumentation. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
PR SummaryLow Risk Overview
Env validation lives in Reviewed by Cursor Bugbot for commit 8460389. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Warning Review limit reached
More reviews will be available in 46 minutes and 42 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 (4)
WalkthroughIntroduces the Changesa2a-nats-server new crate
Sequence Diagram(s)sequenceDiagram
participant main as main (non-coverage)
participant parse_env as parse_env
participant NATS as NATS server
participant JetStream as JetStream / NatsJetStreamClient
participant Bridge as Bridge<NoopHandler>
main->>parse_env: read env, validate A2A_AGENT_ID, build Config
parse_env-->>main: ValidatedRuntimeConfig
main->>NATS: connect with configured timeout
NATS-->>main: connected client
main->>JetStream: create async context + NatsJetStreamClient
main->>JetStream: provision required streams
main->>Bridge: construct with NoopHandler + cancellation token
Bridge-->>main: run until shutdown signal
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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: 8460389 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
…in stub Coverage gate flagged Display arms for the wrapped error variants (NatsConnect / Provision / Bridge) and the cfg(coverage) main stub as new uncovered statements vs the main baseline. Extract NoopHandler to its own module so each of its 11 methods is exercised by a unit test, add Display tests that fabricate each wrapped RuntimeError variant, and call the cfg(coverage) main stub from a coverage-only test. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>