Skip to content

feat(a2a-bridge): wire inbound HTTPS route, production main, and NATS transport harness - #382

Merged
yordis merged 7 commits into
mainfrom
yordis/feat-a2a-bridge-inbound
Jun 22, 2026
Merged

feat(a2a-bridge): wire inbound HTTPS route, production main, and NATS transport harness#382
yordis merged 7 commits into
mainfrom
yordis/feat-a2a-bridge-inbound

Conversation

@yordis

@yordis yordis commented Jun 21, 2026

Copy link
Copy Markdown
Member
  • With identity, auth-mint, and outbound already merged, the inbound HTTPS surface is what the bridge needs to become deployable end-to-end; landing the harness alongside it so the new request paths get exercised in CI under the `stub` transport without standing up a real NATS server.

@cursor

cursor Bot commented Jun 21, 2026

Copy link
Copy Markdown

PR Summary

High Risk
New auth minting, gateway routing, and JetStream/SSE ordering sit on the critical HTTPS↔NATS path; misconfiguration or race bugs could drop events or block callers indefinitely without careful ops review.

Overview
Adds a deployable a2a-bridge binary and the inbound HTTPS path so JSON-RPC over HTTP can reach NATS gateways end-to-end.

Inbound surface: POST / mints a caller JWT via auth-callout, routes by x-a2a-agent-id to {prefix}.gateway.{agent}.{method}, and forwards correlation, optional x-a2a-caller-id, and minted JWT on NATS headers. Unary methods return gateway JSON as HTTP 200; message/stream and tasks/resubscribe attach JetStream before the gateway unary (interest retention), then emit SSE (gateway-bootstrap + task-event). Gateway JSON-RPC errors stay HTTP 200 like a2a-nats-http; bridge faults map to 502.

Runtime: A2A_BRIDGE_TRANSPORT=stub|nats, shared A2A_PREFIX, env-driven NATS URLs/timeouts, and per-request token connections for gateway RPC (with timeout) and JetStream pulls (ack-after-enqueue, abort on SSE drop).

Tests: In-process NATS transport harness exercises mint-per-request, subject routing, audit publishes, and SSE resubscribe without a live server; optional ignored compose smoke.

Reviewed by Cursor Bugbot for commit 6007d3a. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yordis, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 30 minutes and 11 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 03aa63e8-bccf-426a-b00f-e441777cd2f7

📥 Commits

Reviewing files that changed from the base of the PR and between b4add05 and 6007d3a.

📒 Files selected for processing (3)
  • rsworkspace/crates/a2a-bridge/src/error.rs
  • rsworkspace/crates/a2a-bridge/src/inbound.rs
  • rsworkspace/crates/a2a-bridge/src/main.rs

Walkthrough

A new a2a-bridge binary and inbound module are added to the existing crate. The module provides an Axum HTTP JSON-RPC endpoint that mints per-request user JWTs, publishes requests to NATS, and optionally streams JetStream task events as SSE. A binary entrypoint bootstraps either stub or live NATS transport from environment variables, and a NATS transport test harness with integration tests validates the wiring.

Changes

Inbound HTTP-to-NATS Gateway

Layer / File(s) Summary
AppState, traits, and subject helpers
rsworkspace/crates/a2a-bridge/src/inbound.rs
Defines AppState, InboundGatewayPublish, GatewayUnaryPublish, TaskJetStreamPort trait contracts, stub/recording/NATS/scripted concrete implementations, and subject-building helpers for NATS routing and SSE method detection.
SSE helpers, request parsing, and HTTP handler
rsworkspace/crates/a2a-bridge/src/inbound.rs
Adds SSE event formatting, NATS header construction, JSON-RPC correlation/streaming parameter parsing, the Axum router, and handle_jsonrpc orchestrating JWT minting, unary publish, optional JetStream SSE merging, and 502 error mapping.
Module declaration and public re-exports
rsworkspace/crates/a2a-bridge/src/lib.rs, rsworkspace/crates/a2a-bridge/src/auth.rs
Declares pub mod inbound and a cfg(test) nats_transport_harness module in lib.rs, re-exports inbound gateway types, and adds a cfg(test) re-export of harness_callout_dispatcher in auth.rs.
Binary target and dependencies
rsworkspace/crates/a2a-bridge/Cargo.toml
Adds the [[bin]] target at src/main.rs; enables async-nats's jetstream feature; adds futures-util; extends tokio with signal; pins tracing-subscriber = "=0.3.23"; and adds trogon-nats with test-support in dev-dependencies.
Binary entrypoint and NATS/stub bootstrap
rsworkspace/crates/a2a-bridge/src/main.rs
Implements main entrypoint (tracing init + error handling), run (transport selection and TCP binding), BootstrapError enum, bootstrap_stub_transport and bootstrap_nats_transport (with timeout/credential env parsing), parse_nats_servers (URL normalization), and parse_u64_env helper.
NATS transport harness and integration tests
rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs
Adds HarnessGatewayUnary recording stub, build_nats_transport_app_state factory, test helpers, and integration tests for message/send minting and JSON-RPC body, tasks/resubscribe SSE streaming with bootstrap + task events, and an ignored live-NATS smoke test.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant handle_jsonrpc
  participant AuthCallout as Auth Callout (JWT Mint)
  participant InboundGatewayPublish as NATS Unary Publisher
  participant TaskJetStreamPort as JetStream SSE Port

  Client->>handle_jsonrpc: POST /jsonrpc (HTTP headers + body)
  handle_jsonrpc->>AuthCallout: mint per-request caller JWT
  AuthCallout-->>handle_jsonrpc: BridgeUserJwt
  handle_jsonrpc->>handle_jsonrpc: parse method, correlation id, build NATS subject
  handle_jsonrpc->>InboundGatewayPublish: publish(subject, headers w/ JWT + correlation, body)
  InboundGatewayPublish-->>handle_jsonrpc: JSON-RPC response bytes

  alt is_sse_method (message/stream or tasks/resubscribe)
    handle_jsonrpc->>TaskJetStreamPort: consume_stream(SseConsumePlan)
    TaskJetStreamPort-->>handle_jsonrpc: async task event stream
    handle_jsonrpc-->>Client: text/event-stream (bootstrap event + task events)
  else unary method
    handle_jsonrpc-->>Client: JSON response body
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • TrogonStack/trogonai#357: The main PR's a2a-bridge inbound JSON-RPC SSE forwarding/consumption explicitly special-cases the message/stream method, which matches and depends on the a2a-nats side now implementing the message/stream executor handler that bootstraps and publishes the corresponding task event stream.

Suggested labels

rust:coverage-baseline-reset

🐇 A bridge has grown from stub to stream,
With JetStream hops and JWT gleam,
Each JSON-RPC hops through NATS with glee,
SSE events flow for all to see!
A rabbit wired the subject dots — hooray,
The gateway bunnies are here to stay! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 47.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding inbound HTTPS routing, production main entry point, and NATS transport harness to the a2a-bridge component.
Description check ✅ Passed The description clearly explains the purpose of these changes—completing the deployable bridge with the inbound HTTPS surface and including a harness for CI testing without a real NATS server.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/feat-a2a-bridge-inbound

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs
Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs
@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown

badge

Code Coverage Summary

Details
Filename                                                                                  Stmts    Miss  Cover    Missing
--------------------------------------------------------------------------------------  -------  ------  -------  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
crates/mcp-nats/src/server.rs                                                                31       0  100.00%
crates/mcp-nats/src/transport.rs                                                            698       0  100.00%
crates/mcp-nats/src/mcp_peer_id.rs                                                           31       0  100.00%
crates/mcp-nats/src/client.rs                                                                31       0  100.00%
crates/mcp-nats/src/config.rs                                                               110       0  100.00%
crates/mcp-nats/src/jsonrpc.rs                                                               22       0  100.00%
crates/mcp-nats/src/mcp_prefix.rs                                                            34       0  100.00%
crates/trogon-nats/src/messaging.rs                                                         534       2  99.63%   144, 154
crates/trogon-nats/src/mocks.rs                                                             314       0  100.00%
crates/trogon-nats/src/connect.rs                                                            82       6  92.68%   41-46
crates/trogon-nats/src/token.rs                                                               6       0  100.00%
crates/trogon-nats/src/subject_token_violation.rs                                            11       0  100.00%
crates/trogon-nats/src/client.rs                                                             22      22  0.00%    50-86
crates/trogon-nats/src/server_info.rs                                                        76       3  96.05%   19-21
crates/trogon-nats/src/nats_token.rs                                                        157       0  100.00%
crates/trogon-nats/src/auth.rs                                                              114       0  100.00%
crates/trogon-decider-runtime/src/snapshot/read_snapshot.rs                                  11       0  100.00%
crates/trogon-decider-runtime/src/snapshot/mod.rs                                             3       0  100.00%
crates/trogon-decider-runtime/src/snapshot/snapshot_type.rs                                  73       0  100.00%
crates/trogon-gateway/src/source/slack/socket_mode.rs                                       716       0  100.00%
crates/trogon-gateway/src/source/slack/config.rs                                             58       0  100.00%
crates/trogon-gateway/src/source/slack/server.rs                                            853       0  100.00%
crates/trogon-gateway/src/source/slack/signature.rs                                          66       0  100.00%
crates/trogon-nats/src/jetstream/create_conflicts.rs                                         24       0  100.00%
crates/trogon-nats/src/jetstream/mocks.rs                                                  1686       1  99.94%   505
crates/trogon-nats/src/jetstream/stream_max_age.rs                                           18       0  100.00%
crates/trogon-nats/src/jetstream/claim_check.rs                                             393      10  97.46%   45-47, 99-105
crates/trogon-nats/src/jetstream/traits.rs                                                   46      40  13.04%   181-251
crates/trogon-nats/src/jetstream/publish.rs                                                  64       0  100.00%
crates/trogon-scheduler/src/commands/domain/schedule.rs                                     638       0  100.00%
crates/trogon-scheduler/src/commands/domain/schedule_event_status.rs                         10       0  100.00%
crates/trogon-scheduler/src/commands/domain/schedule_event_delivery.rs                       25       0  100.00%
crates/trogon-scheduler/src/commands/domain/message.rs                                      219       0  100.00%
crates/trogon-scheduler/src/commands/domain/schedule_id.rs                                   81       0  100.00%
crates/trogon-scheduler/src/commands/domain/schedule_occurrence_sequence.rs                  30       0  100.00%
crates/trogon-scheduler/src/commands/domain/schedule_event_schedule.rs                       83       0  100.00%
crates/trogon-scheduler/src/commands/domain/schedule_event_sampling_source.rs                20       0  100.00%
crates/trogon-scheduler/src/commands/domain/recurrence.rs                                   179       1  99.44%   99
crates/trogon-decider-runtime/src/execution.rs                                             1432       0  100.00%
crates/trogon-decider-nats/src/snapshot_store.rs                                            861      27  96.86%   208-210, 248-250, 361-367, 449, 585, 590, 686-688, 694-696, 730-731, 741-742, 761, 789-790
crates/trogon-decider-nats/src/store.rs                                                     128      45  64.84%   50-54, 101-167
crates/trogon-decider-nats/src/stream_store.rs                                              659      18  97.27%   70-72, 245, 273-274, 277, 293-297, 464-465, 506, 519-523
crates/acp-nats/src/agent/ext_method.rs                                                      82       0  100.00%
crates/acp-nats/src/agent/new_session.rs                                                     82       0  100.00%
crates/acp-nats/src/agent/initialize.rs                                                      79       0  100.00%
crates/acp-nats/src/agent/set_session_mode.rs                                                67       0  100.00%
crates/acp-nats/src/agent/cancel.rs                                                         101       0  100.00%
crates/acp-nats/src/agent/load_session.rs                                                    89       0  100.00%
crates/acp-nats/src/agent/bridge.rs                                                         123       4  96.75%   108-111
crates/acp-nats/src/agent/mod.rs                                                             65       0  100.00%
crates/acp-nats/src/agent/js_request.rs                                                     283       0  100.00%
crates/acp-nats/src/agent/ext_notification.rs                                                82       0  100.00%
crates/acp-nats/src/agent/test_support.rs                                                   267       0  100.00%
crates/acp-nats/src/agent/set_session_config_option.rs                                       67       0  100.00%
crates/acp-nats/src/agent/close_session.rs                                                   63       0  100.00%
crates/acp-nats/src/agent/logout.rs                                                          49       0  100.00%
crates/acp-nats/src/agent/prompt.rs                                                         471       0  100.00%
crates/acp-nats/src/agent/resume_session.rs                                                  90       0  100.00%
crates/acp-nats/src/agent/authenticate.rs                                                    49       0  100.00%
crates/acp-nats/src/agent/fork_session.rs                                                    94       0  100.00%
crates/acp-nats/src/agent/list_sessions.rs                                                   47       0  100.00%
crates/acp-nats/src/agent/set_session_model.rs                                               67       0  100.00%
crates/a2a-nats-server/src/main.rs                                                            4       0  100.00%
crates/a2a-nats-server/src/noop_handler.rs                                                  183       0  100.00%
crates/a2a-nats-server/src/runtime.rs                                                        80       0  100.00%
crates/trogon-gateway/src/source/incidentio/config.rs                                        16       0  100.00%
crates/trogon-gateway/src/source/incidentio/signature.rs                                    206       0  100.00%
crates/trogon-gateway/src/source/incidentio/incidentio_event_type.rs                         62       0  100.00%
crates/trogon-gateway/src/source/incidentio/incidentio_signing_secret.rs                     56       0  100.00%
crates/trogon-gateway/src/source/incidentio/server.rs                                       343       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/rrule_wakeup_payload.rs       35       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/recorded_events.rs           690      16  97.68%   200-205, 242, 250, 271, 291, 297, 303, 336, 346, 364, 448, 533, 541, 818, 1034
crates/trogon-scheduler/src/processor/execution/reconciliation/go_duration.rs                59       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/schedule_key.rs               67       0  100.00%
crates/trogon-scheduler/src/processor/execution/reconciliation/schedule_subject.rs           59       3  94.92%   60-62
crates/trogon-scheduler/src/processor/execution/reconciliation/request.rs                   542       2  99.63%   285, 290
crates/trogon-scheduler/src/processor/execution/reconciliation/reconcile.rs                 808      13  98.39%   251-260, 325-327
crates/a2a-auth-callout/src/wire/callout_auth_response_claims.rs                             94      23  75.53%   49-74
crates/a2a-auth-callout/src/wire/nkey_public.rs                                             106      11  89.62%   47, 71-73, 87-90, 102, 118-119
crates/a2a-auth-callout/src/wire/wire_codec.rs                                               58      58  0.00%    19-92
crates/a2a-auth-callout/src/wire/bridge_adapter.rs                                           73      14  80.82%   30-40, 53-54, 58
crates/a2a-auth-callout/src/wire/test_encode.rs                                              59       0  100.00%
crates/a2a-auth-callout/src/wire/nkey_seed.rs                                                61       0  100.00%
crates/a2a-auth-callout/src/wire/server_auth_request_claims.rs                              100      17  83.00%   24-26, 36-38, 120, 123-127, 141-146
crates/a2a-auth-callout/src/wire/xkey_public.rs                                              51       0  100.00%
crates/a2a-auth-callout/src/wire/server_auth_request_envelope.rs                            108      29  73.15%   16-18, 29-33, 38-39, 41-44, 64, 77-94
crates/trogon-gateway/src/source/telegram/registration.rs                                   313       0  100.00%
crates/trogon-gateway/src/source/telegram/server.rs                                         339       0  100.00%
crates/trogon-gateway/src/source/telegram/config.rs                                          89       0  100.00%
crates/trogon-gateway/src/source/telegram/signature.rs                                       27       0  100.00%
crates/a2a-nats-stdio/src/wire.rs                                                            57       0  100.00%
crates/a2a-nats-stdio/src/main.rs                                                             4       0  100.00%
crates/a2a-nats-stdio/src/dispatch.rs                                                       839      11  98.69%   116, 119-121, 229, 232-234, 668, 1058, 1068
crates/a2a-nats-stdio/src/io_loop.rs                                                         84       0  100.00%
crates/a2a-nats-stdio/src/runtime.rs                                                         86       0  100.00%
crates/acp-nats-server/src/acp_connection_id.rs                                              37       0  100.00%
crates/acp-nats-server/src/config.rs                                                        126       3  97.62%   41-43
crates/acp-nats-server/src/main.rs                                                          900      10  98.89%   109, 243-250, 450
crates/acp-nats-server/src/transport.rs                                                    1915     106  94.46%   253, 512, 530, 557, 611, 616, 636, 648, 767, 790-792, 844, 861-864, 960-963, 1038, 1041, 1044, 1053, 1057, 1060, 1063-1066, 1085, 1118-1121, 1129-1134, 1146-1150, 1154-1163, 1175-1176, 1194-1195, 1205, 1221-1225, 1253-1259, 1279-1281, 1286-1290, 1293-1298, 1315, 1317-1318, 1400-1401, 1413-1414, 1434-1435, 1487-1503, 2208, 2252, 2305, 2361, 2374
crates/acp-nats-server/src/connection.rs                                                    182      36  80.22%   95-102, 107-122, 138, 140-141, 146, 155-156, 161, 165, 169, 172, 180, 184, 187, 190-194, 232
crates/mcp-nats/src/telemetry/transport.rs                                                    6       0  100.00%
crates/trogon-gateway/src/source/notion/signature.rs                                         45       0  100.00%
crates/trogon-gateway/src/source/notion/server.rs                                           310       4  98.71%   115-116, 135-136
crates/trogon-gateway/src/source/notion/notion_verification_token.rs                         17       0  100.00%
crates/trogon-gateway/src/source/notion/verification_token.rs                               220       0  100.00%
crates/trogon-gateway/src/source/notion/notion_event_type.rs                                 46       3  93.48%   50-52
crates/trogon-nats/src/lease/lease_bucket.rs                                                 19       0  100.00%
crates/trogon-nats/src/lease/lease_key.rs                                                    19       0  100.00%
crates/trogon-nats/src/lease/renew_interval.rs                                               57       0  100.00%
crates/trogon-nats/src/lease/mod.rs                                                         523      13  97.51%   113-126
crates/trogon-nats/src/lease/lease_timing.rs                                                 15       0  100.00%
crates/trogon-nats/src/lease/release.rs                                                       5       5  0.00%    8-12
crates/trogon-nats/src/lease/nats_kv_lease_config.rs                                         26       0  100.00%
crates/trogon-nats/src/lease/provision.rs                                                   187      10  94.65%   82-92
crates/trogon-nats/src/lease/acquire.rs                                                       5       5  0.00%    9-14
crates/trogon-nats/src/lease/renew.rs                                                       246      19  92.28%   23-29, 48-59
crates/trogon-nats/src/lease/ttl.rs                                                          68       0  100.00%
crates/a2a-nats/src/context_id.rs                                                            51       1  98.04%   26
crates/a2a-nats/src/a2a_prefix.rs                                                            44       0  100.00%
crates/a2a-nats/src/gateway_ingress.rs                                                      243       0  100.00%
crates/a2a-nats/src/error.rs                                                                 32       0  100.00%
crates/a2a-nats/src/task_id.rs                                                               54       1  98.15%   25
crates/a2a-nats/src/req_id.rs                                                                41       0  100.00%
crates/a2a-nats/src/constants.rs                                                             36       0  100.00%
crates/a2a-nats/src/agent_id.rs                                                              58       0  100.00%
crates/a2a-nats/src/jsonrpc.rs                                                               49       0  100.00%
crates/a2a-nats/src/config.rs                                                               318       0  100.00%
crates/trogonai-proto/src/scheduler/schedules/codec.rs                                      377       0  100.00%
crates/mcp-nats/src/nats/subjects/subscriptions/all_server.rs                                 6       0  100.00%
crates/mcp-nats/src/nats/subjects/subscriptions/one_client.rs                                 9       0  100.00%
crates/mcp-nats/src/nats/subjects/subscriptions/all_client.rs                                 6       0  100.00%
crates/mcp-nats/src/nats/subjects/subscriptions/one_server.rs                                 9       0  100.00%
crates/trogon-service-config/src/lib.rs                                                      92       0  100.00%
crates/a2a-nats/src/nats/subjects/stream.rs                                                  54       0  100.00%
crates/trogon-gateway/src/source/microsoft_graph/server.rs                                  325       0  100.00%
crates/trogon-gateway/src/source/microsoft_graph/client_state.rs                             30       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/minting_material.rs                           18       6  66.67%   31-36
crates/a2a-auth-callout/src/signing_key_source/file.rs                                       38       6  84.21%   40-42, 61-63
crates/a2a-auth-callout/src/signing_key_source/key_version.rs                                16       4  75.00%   19, 30-32
crates/a2a-auth-callout/src/signing_key_source/static_source.rs                              25       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/signing_key_handle.rs                         15       6  60.00%   15-20
crates/a2a-auth-callout/src/signing_key_source/vault.rs                                       3       0  100.00%
crates/a2a-auth-callout/src/signing_key_source/loader.rs                                     18      18  0.00%    7-35
crates/a2a-auth-callout/src/signing_key_source/env.rs                                        38       4  89.47%   58, 75-77
crates/a2a-nats/src/push/authentication_header.rs                                           104       0  100.00%
crates/a2a-nats/src/push/idempotency_key_header.rs                                           43       0  100.00%
crates/a2a-nats/src/push/push_notification_config_id.rs                                      41       0  100.00%
crates/a2a-nats/src/push/status_transition_id.rs                                             30       0  100.00%
crates/a2a-nats/src/push/delivery_semantics.rs                                              274       0  100.00%
crates/a2a-nats/src/push/push_delivery_semantics_registry.rs                                 57       0  100.00%
crates/a2a-nats/src/push/nats_push_subject.rs                                                34       0  100.00%
crates/a2a-nats/src/push/dispatch_error.rs                                                  111       0  100.00%
crates/a2a-nats/src/push/push_notification_target.rs                                        108       0  100.00%
crates/a2a-nats/src/push/caller_id.rs                                                        91       0  100.00%
crates/a2a-nats/src/push/terminal_push_task_state.rs                                         64       0  100.00%
crates/a2a-nats/src/push/push_payload.rs                                                     88       0  100.00%
crates/a2a-nats/src/push/target.rs                                                           54       0  100.00%
crates/a2a-nats/src/push/push_notification_config.rs                                         20       0  100.00%
crates/a2a-nats/src/push/push_idempotency_key.rs                                             84       0  100.00%
crates/a2a-nats/src/push/dlq.rs                                                             283       0  100.00%
crates/a2a-nats/src/push/dlq_dedup.rs                                                       120       0  100.00%
crates/trogon-gateway/src/source/standard_webhooks.rs                                       138       0  100.00%
crates/a2a-nats/src/nats/subjects/subscriptions/agent_all.rs                                 20       0  100.00%
crates/a2a-nats/src/nats/subjects/subscriptions/task_all_events.rs                           17       0  100.00%
crates/a2a-nats/src/nats/subjects/subscriptions/task_one_events.rs                           20       0  100.00%
crates/trogon-scheduler/src/commands/schedule_next_occurrence.rs                            355       0  100.00%
crates/trogon-scheduler/src/commands/record_schedule_occurrence.rs                          348       1  99.71%   182
crates/trogon-scheduler/src/commands/pause_schedule.rs                                      174       0  100.00%
crates/trogon-scheduler/src/commands/snapshot.rs                                              4       0  100.00%
crates/trogon-scheduler/src/commands/remove_schedule.rs                                     171       0  100.00%
crates/trogon-scheduler/src/commands/state.rs                                               472       0  100.00%
crates/trogon-scheduler/src/commands/create_schedule.rs                                     199       0  100.00%
crates/trogon-scheduler/src/commands/resume_schedule.rs                                     207       0  100.00%
crates/a2a-identity-types/src/error.rs                                                       20       0  100.00%
crates/a2a-identity-types/src/jwt.rs                                                        156       0  100.00%
crates/a2a-identity-types/src/principal.rs                                                   40       0  100.00%
crates/a2a-identity-types/src/caller.rs                                                      61       0  100.00%
crates/mcp-nats/src/nats/mod.rs                                                              99       0  100.00%
crates/mcp-nats/src/nats/parsing.rs                                                         191       0  100.00%
crates/trogon-gateway/src/source/sentry/server.rs                                           308       0  100.00%
crates/trogon-gateway/src/source/sentry/sentry_client_secret.rs                              17       0  100.00%
crates/trogon-gateway/src/source/sentry/signature.rs                                         42       0  100.00%
crates/trogon-scheduler/src/telemetry/trace.rs                                               41       0  100.00%
crates/trogon-scheduler/src/telemetry/metrics.rs                                             52       0  100.00%
crates/a2a-bridge/src/main.rs                                                               106     106  0.00%    11-169
crates/a2a-bridge/src/nats_transport_harness.rs                                             162      16  90.12%   294-309
crates/a2a-bridge/src/outbound.rs                                                           125      38  69.60%   32-37, 94-134, 182-219, 288
crates/a2a-bridge/src/error.rs                                                               13       0  100.00%
crates/a2a-bridge/src/auth.rs                                                                47      30  36.17%   27-112, 139, 148-159
crates/a2a-bridge/src/identity.rs                                                            88      15  82.95%   13-19, 156-169
crates/a2a-bridge/src/inbound.rs                                                            339     118  65.19%   60-62, 115-231, 292-417, 469-471, 482, 550-551, 580, 615-617, 631-646, 655, 687-692
crates/acp-nats/src/nats/subjects/mod.rs                                                    362       0  100.00%
crates/acp-nats/src/nats/subjects/stream.rs                                                  56       0  100.00%
crates/trogon-nats/src/telemetry/messaging.rs                                                82       0  100.00%
crates/trogon-scheduler/src/processor/execution/worker/consumer.rs                          203       0  100.00%
crates/trogon-scheduler/src/processor/execution/worker/dispatcher.rs                       1112       1  99.91%   200
crates/trogon-scheduler/src/processor/execution/worker/testkit.rs                           330       4  98.79%   459, 490-491, 496
crates/trogon-scheduler/src/processor/execution/worker/processor.rs                        1356      12  99.12%   279, 339, 437-438, 444, 499-501, 533-536
crates/acp-nats/src/telemetry/metrics.rs                                                     53       0  100.00%
crates/a2a-nats-http/src/handlers/mod.rs                                                    185      68  63.24%   52-57, 64, 68, 74, 88-91, 95, 111, 115, 121, 125, 143-176, 182, 185, 190-196, 200-206, 210-216, 220-221
crates/trogon-gateway/src/source/github/config.rs                                            17       0  100.00%
crates/trogon-gateway/src/source/github/signature.rs                                         50       0  100.00%
crates/trogon-gateway/src/source/github/server.rs                                           328       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_envelope_encode_error.rs           14       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_payload_decode.rs                   3       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_encode_error.rs                    36       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_decode_error.rs                    49       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/snapshot_envelope_decode_error.rs           28       0  100.00%
crates/trogon-decider-runtime/src/snapshot/codec/encoded_snapshot.rs                        117       0  100.00%
crates/acp-nats/src/jetstream/consumers.rs                                                   91       0  100.00%
crates/acp-nats/src/jetstream/streams.rs                                                    163       4  97.55%   206-208, 218
crates/acp-nats/src/jetstream/ext_policy.rs                                                  26       0  100.00%
crates/acp-nats/src/jetstream/provision.rs                                                   52       0  100.00%
crates/trogon-gateway/src/source/twitter/signature.rs                                        58       0  100.00%
crates/trogon-gateway/src/source/twitter/config.rs                                           17       0  100.00%
crates/trogon-gateway/src/source/twitter/server.rs                                          524       0  100.00%
crates/trogon-gateway/src/source/linear/signature.rs                                         54       1  98.15%   16
crates/trogon-gateway/src/source/linear/config.rs                                            17       0  100.00%
crates/trogon-gateway/src/source/linear/server.rs                                           386       0  100.00%
crates/trogon-std/src/time/mock.rs                                                          125       0  100.00%
crates/trogon-std/src/time/system.rs                                                         31       0  100.00%
crates/trogon-telemetry/src/service_name.rs                                                  44       0  100.00%
crates/trogon-telemetry/src/trace.rs                                                         23       1  95.65%   24
crates/trogon-telemetry/src/resource_attribute.rs                                            23       0  100.00%
crates/trogon-telemetry/src/metric.rs                                                        26       1  96.15%   30
crates/trogon-telemetry/src/lib.rs                                                          208      23  88.94%   119, 124, 129, 139-140, 146-164, 200, 203, 206, 212
crates/trogon-telemetry/src/log.rs                                                           70       1  98.57%   35
crates/a2a-auth-callout/src/jwt/user_jwt_subject.rs                                          12       6  50.00%   18-26
crates/a2a-auth-callout/src/jwt/nats_permission_claims.rs                                    10       0  100.00%
crates/a2a-auth-callout/src/jwt/mod.rs                                                      312      97  68.91%   28-31, 45-51, 59-78, 115-118, 123, 181, 185-187, 196-220, 243, 252-254, 273, 280-283, 312-314, 346-376, 428, 433-437
crates/a2a-auth-callout/src/jwt/nats_user_jwt.rs                                            232      21  90.95%   131, 178, 187-196, 209, 214, 228, 237-242, 284, 288, 313
crates/a2a-nats/src/catalog/import_gate/error.rs                                              9       0  100.00%
crates/a2a-nats/src/catalog/import_gate/allow_all.rs                                          2       0  100.00%
crates/a2a-nats/src/catalog/import_gate/principal.rs                                         14       0  100.00%
crates/a2a-nats/src/catalog/import_gate/spicedb/cache.rs                                     36       0  100.00%
crates/a2a-nats/src/catalog/import_gate/spicedb/mod.rs                                      107       0  100.00%
crates/a2a-nats/src/catalog/import_gate/spicedb/config.rs                                    70       0  100.00%
crates/trogon-std/src/dirs/fixed.rs                                                          80       0  100.00%
crates/trogon-std/src/dirs/system.rs                                                         71       0  100.00%
crates/mcp-nats/src/nats/subjects/mod.rs                                                     89       0  100.00%
crates/trogon-gateway/src/source/discord/gateway.rs                                         426       1  99.77%   137
crates/trogon-gateway/src/source/discord/config.rs                                          105       0  100.00%
crates/mcp-nats-stdio/src/main.rs                                                           204       0  100.00%
crates/mcp-nats-stdio/src/config.rs                                                         149       0  100.00%
crates/trogon-decider/src/decision.rs                                                        27       0  100.00%
crates/trogon-decider/src/events.rs                                                          49       0  100.00%
crates/trogon-decider/src/act.rs                                                             62       0  100.00%
crates/trogon-decider/src/testing.rs                                                        675       0  100.00%
crates/trogon-decider/src/lib.rs                                                            138       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/push/delete.rs                                      23       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/push/set.rs                                         20       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/push/list.rs                                        23       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/push/get.rs                                         20       0  100.00%
crates/trogon-gateway/src/source/gitlab/signature.rs                                        165       0  100.00%
crates/trogon-gateway/src/source/gitlab/gitlab_signing_token.rs                              62       0  100.00%
crates/trogon-gateway/src/source/gitlab/server.rs                                           460       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/tasks/get.rs                                        23       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/tasks/resubscribe.rs                                23       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/tasks/cancel.rs                                     23       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/tasks/list.rs                                       23       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/message_send.rs                                     23       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/message_stream.rs                                   23       0  100.00%
crates/a2a-nats/src/nats/subjects/agents/card.rs                                             20       0  100.00%
crates/mcp-nats/src/nats/subjects/server/read_resource.rs                                    12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/unsubscribe_resource.rs                             12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_tools.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/call_tool.rs                                        12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_prompts.rs                                     12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_resources.rs                                   12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/subscribe_resource.rs                               12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/resource_list_changed.rs                            12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/ping.rs                                              9       0  100.00%
crates/mcp-nats/src/nats/subjects/server/resource_updated.rs                                 12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/get_task.rs                                         12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/complete.rs                                         12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_tasks.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/cancel_task.rs                                      12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/cancelled.rs                                        12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/elicitation_completed.rs                            12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/initialize.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/list_resource_templates.rs                          12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/logging_message.rs                                  12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/get_task_result.rs                                  12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/prompt_list_changed.rs                              12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/set_logging_level.rs                                12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/get_prompt.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/tool_list_changed.rs                                12       0  100.00%
crates/mcp-nats/src/nats/subjects/server/progress.rs                                         12       0  100.00%
crates/acp-nats/src/nats/subjects/global/ext_notify.rs                                        9       0  100.00%
crates/acp-nats/src/nats/subjects/global/initialize.rs                                        6       0  100.00%
crates/acp-nats/src/nats/subjects/global/ext.rs                                               9       0  100.00%
crates/acp-nats/src/nats/subjects/global/logout.rs                                            6       0  100.00%
crates/acp-nats/src/nats/subjects/global/session_new.rs                                       6       0  100.00%
crates/acp-nats/src/nats/subjects/global/session_list.rs                                      6       0  100.00%
crates/acp-nats/src/nats/subjects/global/authenticate.rs                                      6       0  100.00%
crates/trogon-std/src/telemetry/http.rs                                                     217       0  100.00%
crates/acp-nats-agent/src/connection.rs                                                    1252       1  99.92%   583
crates/acp-nats/src/nats/parsing.rs                                                         278       1  99.64%   151
crates/acp-nats/src/nats/mod.rs                                                              23       0  100.00%
crates/acp-nats/src/nats/extensions.rs                                                        3       0  100.00%
crates/a2a-auth-callout/src/account_resolver.rs                                              53       1  98.11%   38
crates/a2a-auth-callout/src/subscriber.rs                                                    96      96  0.00%    26-177
crates/a2a-auth-callout/src/denial_claims.rs                                                111       6  94.59%   24, 47, 70, 100-105
crates/a2a-auth-callout/src/denial_reason.rs                                                 30       0  100.00%
crates/a2a-auth-callout/src/denial_category.rs                                               90       1  98.89%   40
crates/a2a-auth-callout/src/test_support.rs                                                  20      20  0.00%    16-36
crates/a2a-auth-callout/src/caller_jwt_header.rs                                             20      14  30.00%   15-29, 37-39
crates/a2a-auth-callout/src/permissions.rs                                                  164       4  97.56%   14-17
crates/a2a-auth-callout/src/main.rs                                                         143     143  0.00%    21-217
crates/a2a-auth-callout/src/error.rs                                                         80       0  100.00%
crates/a2a-auth-callout/src/dispatcher.rs                                                   167      19  88.62%   58-62, 82-112
crates/trogon-std/src/json.rs                                                                30       0  100.00%
crates/trogon-std/src/secret_string.rs                                                       32       0  100.00%
crates/trogon-std/src/signal.rs                                                              26      12  53.85%   6-11, 18-25, 34
crates/trogon-std/src/uuid.rs                                                                 7       0  100.00%
crates/trogon-std/src/args.rs                                                                19       9  52.63%   11-28
crates/trogon-std/src/duration.rs                                                            42       0  100.00%
crates/trogon-std/src/http.rs                                                                19       0  100.00%
crates/mcp-nats/src/nats/subjects/client/progress.rs                                         12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/create_elicitation.rs                               12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/roots_list_changed.rs                               12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/initialized.rs                                      12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/cancelled.rs                                        12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/create_message.rs                                   12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/list_roots.rs                                       12       0  100.00%
crates/mcp-nats/src/nats/subjects/client/ping.rs                                              9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/all_agent_ext.rs                              9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/one_client.rs                                15       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/all_session.rs                                9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/global_all.rs                                 9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/one_session.rs                               12       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/all_agent.rs                                  9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/one_agent.rs                                 15       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/prompt_wildcard.rs                            9       0  100.00%
crates/acp-nats/src/nats/subjects/subscriptions/all_client.rs                                 9       0  100.00%
crates/trogon-decider-runtime/src/stream/mod.rs                                              38       0  100.00%
crates/trogon-decider-runtime/src/stream/read_stream.rs                                       7       0  100.00%
crates/trogon-decider-runtime/src/stream/stream_position.rs                                  26       0  100.00%
crates/trogon-decider-runtime/src/stream/append_stream.rs                                     5       0  100.00%
crates/acp-nats-stdio/src/config.rs                                                          66       0  100.00%
crates/acp-nats-stdio/src/main.rs                                                           135      25  81.48%   67, 115-122, 128-130, 147, 176-195
crates/a2a-auth-callout/src/credentials/api_key.rs                                          117       4  96.58%   33, 38-40
crates/a2a-auth-callout/src/credentials/mtls.rs                                             212      29  86.32%   60-62, 71-72, 81, 118-122, 131-135, 151, 153-154, 168-169, 209-213, 216-219
crates/a2a-auth-callout/src/credentials/oidc.rs                                             405      24  94.07%   18-19, 21-23, 48-50, 160, 164, 178, 212-218, 278-280, 306, 450, 509, 528
crates/a2a-bridge/src/auth/callout_mint.rs                                                   62       5  91.94%   20, 57-77
crates/a2a-nats/src/catalog/nats_kv.rs                                                       19       0  100.00%
crates/a2a-nats/src/catalog/watch.rs                                                         99       0  100.00%
crates/a2a-nats/src/catalog/registrar.rs                                                    211       0  100.00%
crates/a2a-nats/src/catalog/store.rs                                                        382       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/fs_write_text_file.rs                           12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/session_update.rs                               12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/fs_read_text_file.rs                            12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_kill.rs                                12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_wait_for_exit.rs                       12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/session_request_permission.rs                   12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_output.rs                              12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_create.rs                              12       0  100.00%
crates/acp-nats/src/nats/subjects/client_ops/terminal_release.rs                             12       0  100.00%
crates/acp-nats/src/nats/subjects/commands/fork.rs                                           15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/load.rs                                           15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/cancel.rs                                         15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/resume.rs                                         15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/set_model.rs                                      15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/set_config_option.rs                              15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/close.rs                                          15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/prompt.rs                                         15       0  100.00%
crates/acp-nats/src/nats/subjects/commands/set_mode.rs                                       15       0  100.00%
crates/mcp-nats-server/src/config.rs                                                        257       0  100.00%
crates/mcp-nats-server/src/main.rs                                                          357     127  64.43%   151-168, 204-206, 216, 222-223, 230-233, 257-259, 263-272, 294-307, 312-360, 491, 494, 502-544
crates/mcp-nats-server/src/allowed_host.rs                                                   88       0  100.00%
crates/a2a-nats/src/audit/envelope.rs                                                       204       0  100.00%
crates/a2a-nats/src/audit/task_lifecycle.rs                                                  17       0  100.00%
crates/a2a-nats/src/audit/emitter.rs                                                        160       0  100.00%
crates/a2a-nats/src/server/push_delete.rs                                                    97       0  100.00%
crates/a2a-nats/src/server/handler.rs                                                        70       0  100.00%
crates/a2a-nats/src/server/push_get.rs                                                      106       0  100.00%
crates/a2a-nats/src/server/bridge.rs                                                        274       0  100.00%
crates/a2a-nats/src/server/message_send.rs                                                  114       0  100.00%
crates/a2a-nats/src/server/push_list.rs                                                     104       0  100.00%
crates/a2a-nats/src/server/tasks_resubscribe.rs                                             103       0  100.00%
crates/a2a-nats/src/server/test_support.rs                                                   41       0  100.00%
crates/a2a-nats/src/server/wire.rs                                                          120       0  100.00%
crates/a2a-nats/src/server/tasks_list.rs                                                     97       0  100.00%
crates/a2a-nats/src/server/agent_card.rs                                                    191       0  100.00%
crates/a2a-nats/src/server/message_stream.rs                                                265       0  100.00%
crates/a2a-nats/src/server/push_set.rs                                                       99       0  100.00%
crates/a2a-nats/src/server/tasks_get.rs                                                     103       0  100.00%
crates/a2a-nats/src/server/tasks_cancel.rs                                                  103       0  100.00%
crates/a2a-nats/src/server/dispatch.rs                                                      113       0  100.00%
crates/acp-nats/src/ext_method_name.rs                                                       65       0  100.00%
crates/acp-nats/src/jsonrpc.rs                                                                6       0  100.00%
crates/acp-nats/src/pending_prompt_waiters.rs                                               131       0  100.00%
crates/acp-nats/src/acp_prefix.rs                                                            46       0  100.00%
crates/acp-nats/src/config.rs                                                               203       0  100.00%
crates/acp-nats/src/req_id.rs                                                                39       0  100.00%
crates/acp-nats/src/in_flight_slot_guard.rs                                                  32       0  100.00%
crates/acp-nats/src/error.rs                                                                 82       0  100.00%
crates/acp-nats/src/lib.rs                                                                   69       0  100.00%
crates/acp-nats/src/session_id.rs                                                            68       0  100.00%
crates/acp-nats/src/client_proxy.rs                                                         181       0  100.00%
crates/trogon-decider-runtime/src/event/codec/event_payload_error.rs                         25       0  100.00%
crates/trogon-decider-runtime/src/event/codec/event_decode.rs                                29       0  100.00%
crates/trogon-scheduler/src/processor/execution/wakeup.rs                                   353       7  98.02%   83-85, 127, 400, 416, 585
crates/trogon-gateway/src/main.rs                                                           111       0  100.00%
crates/trogon-gateway/src/source_integration_id.rs                                           55       2  96.36%   58, 60
crates/trogon-gateway/src/streams.rs                                                        129       0  100.00%
crates/trogon-gateway/src/source_status.rs                                                   24       0  100.00%
crates/trogon-gateway/src/http.rs                                                           145       0  100.00%
crates/trogon-gateway/src/config.rs                                                        2589      42  98.38%   80, 663, 666, 826, 883, 966, 969, 972, 976, 1060-1067, 1144, 1147, 1150, 1155, 1213, 1216, 1219, 1298, 1301, 1304, 1308, 1372, 1375, 1378, 1441, 1444, 1447, 1452, 1527, 1530, 1533, 1538, 1596, 1599, 1602, 1815-1817
crates/trogon-gateway/src/source_plugin.rs                                                  268       3  98.88%   82, 139-140
crates/trogon-std/src/env/in_memory.rs                                                       73       0  100.00%
crates/trogon-std/src/env/system.rs                                                          17       0  100.00%
crates/trogon-std/src/fs/mem.rs                                                             216      10  95.37%   61-63, 77-79, 132-134, 157
crates/trogon-std/src/fs/system.rs                                                           92       0  100.00%
crates/a2a-nats/src/jetstream/provision.rs                                                   62       0  100.00%
crates/a2a-nats/src/jetstream/consumers.rs                                                  112       0  100.00%
crates/a2a-nats/src/jetstream/streams.rs                                                     73       0  100.00%
crates/a2a-nats/src/jetstream/stream_options.rs                                             114       0  100.00%
crates/a2a-pack/src/agent_card_schema.rs                                                     81       0  100.00%
crates/a2a-pack/src/agent_card_read.rs                                                       66       0  100.00%
crates/a2a-nats-http/src/router.rs                                                           55      14  74.55%   59-63, 69-79
crates/a2a-nats-http/src/headers.rs                                                         167       6  96.41%   94, 103, 159, 220-222
crates/a2a-nats-http/src/main.rs                                                              4       0  100.00%
crates/a2a-nats-http/src/rest.rs                                                            316     287  9.18%    63-415, 420-425, 427-428, 432-437
crates/a2a-nats-http/src/runtime.rs                                                           8       8  0.00%    39-121
crates/a2a-nats-http/src/sse.rs                                                              44      28  36.36%   15-51, 61-68
crates/trogon-scheduler/src/processor/execution/checkpoints/codec.rs                        641      68  89.39%   134, 140, 149, 192, 208-210, 227, 244-246, 415, 417-419, 453-464, 480-481, 486-487, 493-494, 507-508, 513-514, 519-523, 529-530, 545-546, 551-552, 558-559, 566-567, 572-573, 585-589, 595-597, 612-618, 626, 631-633, 643, 648
crates/trogon-scheduler/src/processor/execution/checkpoints/failure.rs                       38       0  100.00%
crates/trogon-scheduler/src/processor/execution/checkpoints/record.rs                         6       0  100.00%
crates/trogon-scheduler/src/processor/execution/checkpoints/store.rs                        407      17  95.82%   102, 120, 124, 132, 224-230, 236, 279-283
crates/a2a-nats/src/push/dispatcher/nats.rs                                                 183       0  100.00%
crates/a2a-nats/src/push/dispatcher/http.rs                                                 141       0  100.00%
crates/a2a-nats/src/push/dispatcher/jetstream.rs                                            226       0  100.00%
crates/a2a-nats/src/push/dispatcher/mod.rs                                                   88       0  100.00%
crates/a2a-nats/src/push/dispatcher/composite.rs                                            154       0  100.00%
crates/trogon-scheduler/src/processor/execution/execution_schedules/mod.rs                  270       0  100.00%
crates/trogonai-proto/src/codec.rs                                                           16       0  100.00%
crates/trogonai-proto/src/convert.rs                                                        120       0  100.00%
crates/acp-nats/src/client/terminal_kill.rs                                                 278       0  100.00%
crates/acp-nats/src/client/terminal_create.rs                                               264       0  100.00%
crates/acp-nats/src/client/ext_session_prompt_response.rs                                   135       0  100.00%
crates/acp-nats/src/client/fs_read_text_file.rs                                             346       0  100.00%
crates/acp-nats/src/client/request_permission.rs                                            298       0  100.00%
crates/acp-nats/src/client/rpc_reply.rs                                                      64       0  100.00%
crates/acp-nats/src/client/ext.rs                                                           296       8  97.30%   146-155, 172-181
crates/acp-nats/src/client/mod.rs                                                          2851       0  100.00%
crates/acp-nats/src/client/session_update.rs                                                 55       0  100.00%
crates/acp-nats/src/client/terminal_output.rs                                               206       0  100.00%
crates/acp-nats/src/client/fs_write_text_file.rs                                            408       0  100.00%
crates/acp-nats/src/client/terminal_release.rs                                              335       0  100.00%
crates/acp-nats/src/client/terminal_wait_for_exit.rs                                        364       0  100.00%
crates/trogon-decider-runtime/src/headers/header_value.rs                                    34       0  100.00%
crates/trogon-decider-runtime/src/headers/mod.rs                                             74       0  100.00%
crates/trogon-decider-runtime/src/headers/header_map.rs                                      54       3  94.44%   20-22
crates/trogon-decider-runtime/src/headers/header_name.rs                                     28       0  100.00%
crates/acp-nats/src/nats/subjects/responses/prompt_response.rs                               27       0  100.00%
crates/acp-nats/src/nats/subjects/responses/update.rs                                        27       0  100.00%
crates/acp-nats/src/nats/subjects/responses/cancelled.rs                                     15       0  100.00%
crates/acp-nats/src/nats/subjects/responses/response.rs                                      20       0  100.00%
crates/acp-nats/src/nats/subjects/responses/ext_ready.rs                                     12       0  100.00%
crates/trogon-decider-runtime/src/event/event_identity.rs                                     3       0  100.00%
crates/trogon-decider-runtime/src/event/mod.rs                                              170       0  100.00%
crates/trogon-decider-runtime/src/event/event_id.rs                                          32       0  100.00%
crates/trogon-decider-runtime/src/event/stream_event.rs                                       8       0  100.00%
crates/a2a-nats/src/client/handle.rs                                                        934       0  100.00%
crates/a2a-nats/src/client/event_stream.rs                                                  247       0  100.00%
crates/a2a-nats/src/client/resubscribe.rs                                                    69       0  100.00%
crates/a2a-nats/src/client/unary.rs                                                         187       0  100.00%
crates/a2a-nats/src/client/wire.rs                                                           38       0  100.00%
crates/a2a-nats/src/client/streaming.rs                                                     236       0  100.00%
crates/a2a-nats/src/client/gateway_headers.rs                                                68       0  100.00%
crates/a2a-nats/src/client/error.rs                                                         161       2  98.76%   135, 144
crates/a2a-nats/src/nats/subjects/tasks/events.rs                                            31       0  100.00%
TOTAL                                                                                     66851    2247  96.64%

Diff against main

Filename                                            Stmts    Miss  Cover
------------------------------------------------  -------  ------  --------
crates/a2a-bridge/src/main.rs                        +106    +106  +100.00%
crates/a2a-bridge/src/nats_transport_harness.rs      +162     +16  +90.12%
crates/a2a-bridge/src/auth.rs                           0      -3  +6.38%
crates/a2a-bridge/src/identity.rs                       0      -8  +9.09%
crates/a2a-bridge/src/inbound.rs                     +339    +118  +65.19%
crates/a2a-auth-callout/src/caller_jwt_header.rs        0      -6  +30.00%
crates/a2a-bridge/src/auth/callout_mint.rs              0      -3  +4.84%
TOTAL                                                +607    +220  -0.30%

Results for commit: 6007d3a

Minimum allowed coverage is 95%

♻️ This comment has been updated with latest results

Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs
Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs
Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs (1)

129-136: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Reuse the tenant variable to eliminate duplication.

BridgeTenantAccount::new(HARNESS_TENANT).expect("harness tenant") is created twice. The tenant variable from line 129 can be cloned and reused on line 135.

♻️ Proposed refactor to reuse tenant
 let tenant = BridgeTenantAccount::new(HARNESS_TENANT).expect("harness tenant");
 let dispatcher = Arc::new(harness_callout_dispatcher(HARNESS_CALLER_ID));
 let mint_wire = Arc::new(InProcessCalloutDispatcherMintWire::new(dispatcher, tenant.clone()));
 let auth = Arc::new(AuthCalloutJsonMintClient::with_tenant_account(
     mint_wire.clone(),
     AuthCalloutJsonMintClient::<InProcessCalloutDispatcherMintWire>::default_mint_subject(),
-    Some(BridgeTenantAccount::new(HARNESS_TENANT).expect("harness tenant")),
+    Some(tenant),
 ));
🤖 Prompt for 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.

In `@rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs` around lines 129
- 136, The BridgeTenantAccount::new(HARNESS_TENANT).expect("harness tenant") is
being created twice - once on line 129 and stored in the tenant variable, and
again inline in the AuthCalloutJsonMintClient::with_tenant_account call on line
135. Replace the inline creation in the
AuthCalloutJsonMintClient::with_tenant_account method call with
Some(tenant.clone()) to reuse the already-created tenant variable and eliminate
the duplication.
rsworkspace/crates/a2a-bridge/src/main.rs (1)

116-119: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Error context discarded by stringifying the connect error.

The typed async_nats connection error is converted to a string via format!(), losing the source error chain. Per coding guidelines, wrap source errors as fields/variants rather than stringifying them.

This likely requires BridgeError::NatsConnect (or similar) to hold a #[source] field, which may be outside this file's scope.

🤖 Prompt for 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.

In `@rsworkspace/crates/a2a-bridge/src/main.rs` around lines 116 - 119, The
connect error from the connect_opts.connect() call is being stringified via
format!(), which discards the error chain and source information. Replace the
map_err block that uses BridgeError::NatsPublish with a new typed error variant
(such as BridgeError::NatsConnect) that includes a #[source] field to hold the
original async_nats connection error. This preserves the full error context for
debugging purposes instead of converting it to a string.

Source: Coding guidelines

🤖 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-bridge/src/nats_transport_harness.rs`:
- Around line 70-76: The code silently ignores lock failures when recording test
state for self.last_subject and self.last_caller_jwt_present by using if let Ok
patterns, which causes stale or empty data when mutexes are poisoned, leading to
confusing test assertion failures. Replace the if let Ok patterns with .expect()
or .unwrap() calls on both the self.last_subject.lock() and
self.last_caller_jwt_present.lock() operations to panic immediately when lock
acquisition fails, ensuring test failures are explicit and obvious rather than
silently corrupted.
- Around line 50-58: The last_caller_jwt_present and last_subject methods are
silently handling mutex lock failures by returning false and None respectively
using .ok(), which masks poisoned mutexes that indicate panics elsewhere.
Replace the .ok() calls with .expect() or .unwrap() in both methods to make lock
failures panic immediately, ensuring test harness code surfaces mutex poisoning
issues instead of silently treating them as successful "no data" states. This
applies to both the last_caller_jwt_present method and the last_subject method
where they acquire locks on self.last_caller_jwt_present and self.last_subject
respectively.

---

Nitpick comments:
In `@rsworkspace/crates/a2a-bridge/src/main.rs`:
- Around line 116-119: The connect error from the connect_opts.connect() call is
being stringified via format!(), which discards the error chain and source
information. Replace the map_err block that uses BridgeError::NatsPublish with a
new typed error variant (such as BridgeError::NatsConnect) that includes a
#[source] field to hold the original async_nats connection error. This preserves
the full error context for debugging purposes instead of converting it to a
string.

In `@rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs`:
- Around line 129-136: The
BridgeTenantAccount::new(HARNESS_TENANT).expect("harness tenant") is being
created twice - once on line 129 and stored in the tenant variable, and again
inline in the AuthCalloutJsonMintClient::with_tenant_account call on line 135.
Replace the inline creation in the
AuthCalloutJsonMintClient::with_tenant_account method call with
Some(tenant.clone()) to reuse the already-created tenant variable and eliminate
the duplication.
🪄 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: dc002f95-9b63-4691-b436-39c011f0a131

📥 Commits

Reviewing files that changed from the base of the PR and between a690ea4 and 5612557.

⛔ Files ignored due to path filters (1)
  • rsworkspace/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • rsworkspace/crates/a2a-bridge/Cargo.toml
  • rsworkspace/crates/a2a-bridge/src/auth.rs
  • rsworkspace/crates/a2a-bridge/src/inbound.rs
  • rsworkspace/crates/a2a-bridge/src/lib.rs
  • rsworkspace/crates/a2a-bridge/src/main.rs
  • rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs

Comment thread rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs
Comment thread rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs Outdated
Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs
yordis added 4 commits June 21, 2026 21:41
… transport harness

With the typed identity, auth-mint client, and outbound forwarder in
place, the inbound HTTPS surface is the last shape the bridge needs to
become deployable end-to-end. Landing the harness alongside the
inbound module so the new request paths get exercised in CI under the
\`stub\` transport without standing up a real NATS server.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
For streaming requests with absent/null JSON-RPC id, the correlation
id was being minted twice — once for the gateway publish headers and
once for the JetStream consume plan — so the gateway unary call and
the event consumer used different ReqIds and SSE silently delivered
no task events. Separately, BRIDGE_GATEWAY_RPC_TIMEOUT_SECS only
configured async_nats connection_timeout, leaving request_with_headers
unbounded; a hung gateway responder could block the inbound HTTPS
request indefinitely while the configured RPC timeout was ignored.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…-task cleanup

For streaming JSON-RPC the gateway unary publish raced ahead of the
JetStream consumer; events emitted before the consumer existed were
silently dropped by the events stream's interest retention. The pull
loop also acked each task event before enqueuing it, so a client
disconnect lost the in-flight event with no chance of redelivery, and
the pull task itself stayed alive after the SSE stream dropped,
keeping its NATS connection and ephemeral consumer pinned. Test
harness mutex accessors swallowed poison errors as 'no data', which
hid the real cause when assertions failed.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…eway errors

The streaming path turned every gateway JSON-RPC error envelope into a
HTTP 502 with a bare {\"error\": \"...\"} body, while the unary path (and
a2a-nats-http) forwarded the gateway's JSON-RPC error as HTTP 200 with
the envelope intact. The asymmetry made the same failure mode look
like a bridge transport failure on streaming methods and like an
application-level JSON-RPC error on unary methods.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/feat-a2a-bridge-inbound branch from 33a7458 to b4add05 Compare June 22, 2026 01:41
Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs
Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
rsworkspace/crates/a2a-bridge/src/inbound.rs (3)

49-62: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider accepting domain types instead of primitive strings.

build_gateway_subject takes agent_id: &str and task_events_wild_subject takes task_id: &str, but callers already hold validated domain types (BridgeAgentId, A2aTaskId). Accepting the domain types directly avoids re-exposing raw strings and keeps the type-safety boundary tighter.

Suggested change
 #[must_use]
-pub fn build_gateway_subject(prefix: &A2aPrefix, agent_id: &str, method: &str) -> String {
+pub fn build_gateway_subject(prefix: &A2aPrefix, agent_id: &BridgeAgentId, method: &str) -> String {
     format!(
         "{}.gateway.{}.{}",
         prefix.as_str(),
-        agent_id,
+        agent_id.as_str(),
         gateway_method_to_subject_dots(method)
     )
 }

 #[must_use]
-pub fn task_events_wild_subject(prefix: &A2aPrefix, task_id: &str) -> String {
+pub fn task_events_wild_subject(prefix: &A2aPrefix, task_id: &A2aTaskId) -> String {
     format!("{}.task.{}.events.>", prefix.as_str(), task_id.as_str())
 }
🤖 Prompt for 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.

In `@rsworkspace/crates/a2a-bridge/src/inbound.rs` around lines 49 - 62, The
functions build_gateway_subject and task_events_wild_subject are accepting
primitive string types for agent_id and task_id parameters respectively, but
callers already hold validated domain types (BridgeAgentId and A2aTaskId).
Update the parameter types in build_gateway_subject to accept agent_id:
&BridgeAgentId instead of &str, and in task_events_wild_subject to accept
task_id: &A2aTaskId instead of &str. Then update the format! calls within these
functions to extract the string representation from these domain types (likely
using .as_str() or similar accessor methods) to maintain the same formatting
logic.

Source: Coding guidelines


498-508: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Redundant re-validation of already-validated JWT.

BridgeUserJwt (from auth.mint()) already validates compact-JWT shape at construction (see identity.rs:67-93). Re-validating via MintedUserJwt::new(caller_jwt.as_str()) on line 503 duplicates that check and forces an error conversion to String, losing typed context.

Consider adding an infallible conversion (e.g., impl From<&BridgeUserJwt> for MintedUserJwt) or a shared validated representation so the second validation is unnecessary.

Alternative: infallible conversion

If both types validate the same shape, BridgeUserJwt could expose:

impl BridgeUserJwt {
    pub fn as_minted(&self) -> MintedUserJwt {
        // Safety: BridgeUserJwt construction already validated shape
        MintedUserJwt::new_unchecked(self.as_str())
    }
}

Then in gateway_publish_headers:

-    let minted = MintedUserJwt::new(caller_jwt.as_str()).map_err(|e| BridgeError::Mint(e.to_string()))?;
+    let minted = caller_jwt.as_minted();
🤖 Prompt for 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.

In `@rsworkspace/crates/a2a-bridge/src/inbound.rs` around lines 498 - 508, The
gateway_publish_headers function is performing redundant validation by calling
MintedUserJwt::new on a BridgeUserJwt that was already validated at
construction. Add an infallible conversion method to BridgeUserJwt (such as
as_minted) that returns a MintedUserJwt without re-validation, then replace the
MintedUserJwt::new(caller_jwt.as_str()).map_err(...) call with this new method
to eliminate the duplicate validation check and the error conversion to String
that loses typed context.

Source: Coding guidelines


213-231: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Per-request NATS connection has performance implications.

Each unary_request_gateway call creates a new NATS connection with the caller's JWT. This is architecturally correct for per-user auth but expensive under load. Consider documenting this trade-off or adding a comment explaining why connection pooling isn't viable here (per-request JWT auth requires per-request connections in NATS's connection-level auth model).

🤖 Prompt for 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.

In `@rsworkspace/crates/a2a-bridge/src/inbound.rs` around lines 213 - 231, The
NATS connection creation in the unary_request_gateway method lacks documentation
about the performance trade-off. Add a comment before the
async_nats::ConnectOptions::new() call explaining that a new connection is
created per request to support per-user JWT authentication, and clarify that
connection pooling is not viable here because NATS's connection-level auth model
requires separate connections for different JWT tokens. This will help future
maintainers understand the architectural decision and the performance
implications trade-off.
🤖 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-bridge/src/inbound.rs`:
- Around line 654-672: The Response::builder() error handling is incorrectly
using BridgeError::NatsPublish instead of a more appropriate error type for HTTP
response construction failures. First, add a new error variant to the
BridgeError enum in error.rs such as ResponseBuild that describes HTTP response
building failures. Then, locate both occurrences in the inbound.rs file where
Response::builder() chains end with .map_err(|e|
BridgeError::NatsPublish(e.to_string())) and change them to use the new
ResponseBuild variant instead, ensuring the error attribution correctly reflects
that these are HTTP response construction failures, not NATS publishing
failures.

---

Nitpick comments:
In `@rsworkspace/crates/a2a-bridge/src/inbound.rs`:
- Around line 49-62: The functions build_gateway_subject and
task_events_wild_subject are accepting primitive string types for agent_id and
task_id parameters respectively, but callers already hold validated domain types
(BridgeAgentId and A2aTaskId). Update the parameter types in
build_gateway_subject to accept agent_id: &BridgeAgentId instead of &str, and in
task_events_wild_subject to accept task_id: &A2aTaskId instead of &str. Then
update the format! calls within these functions to extract the string
representation from these domain types (likely using .as_str() or similar
accessor methods) to maintain the same formatting logic.
- Around line 498-508: The gateway_publish_headers function is performing
redundant validation by calling MintedUserJwt::new on a BridgeUserJwt that was
already validated at construction. Add an infallible conversion method to
BridgeUserJwt (such as as_minted) that returns a MintedUserJwt without
re-validation, then replace the
MintedUserJwt::new(caller_jwt.as_str()).map_err(...) call with this new method
to eliminate the duplicate validation check and the error conversion to String
that loses typed context.
- Around line 213-231: The NATS connection creation in the unary_request_gateway
method lacks documentation about the performance trade-off. Add a comment before
the async_nats::ConnectOptions::new() call explaining that a new connection is
created per request to support per-user JWT authentication, and clarify that
connection pooling is not viable here because NATS's connection-level auth model
requires separate connections for different JWT tokens. This will help future
maintainers understand the architectural decision and the performance
implications trade-off.
🪄 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: 85cefb35-5b4e-4abc-8244-a4c0bc0c0e6f

📥 Commits

Reviewing files that changed from the base of the PR and between 5612557 and b4add05.

⛔ Files ignored due to path filters (1)
  • rsworkspace/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • rsworkspace/crates/a2a-bridge/Cargo.toml
  • rsworkspace/crates/a2a-bridge/src/auth.rs
  • rsworkspace/crates/a2a-bridge/src/inbound.rs
  • rsworkspace/crates/a2a-bridge/src/lib.rs
  • rsworkspace/crates/a2a-bridge/src/main.rs
  • rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs
🚧 Files skipped from review as they are similar to previous changes (5)
  • rsworkspace/crates/a2a-bridge/src/auth.rs
  • rsworkspace/crates/a2a-bridge/src/lib.rs
  • rsworkspace/crates/a2a-bridge/src/nats_transport_harness.rs
  • rsworkspace/crates/a2a-bridge/src/main.rs
  • rsworkspace/crates/a2a-bridge/Cargo.toml

Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs Outdated
…l-error-impl policy

The repo's dylint policy denies hand-rolled std::error::Error impls and
requires #[derive(thiserror::Error)], which the binary's bootstrap
error escaped from the original copy of main.rs. Replacing the manual
Display + Error + From<BridgeError> with thiserror attributes keeps the
same wire shape (source chain, From conversion) while clearing the
policy lint.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Comment thread rsworkspace/crates/a2a-bridge/src/inbound.rs
…ag ResponseBuild errors

The inbound path was dropping the external caller identity on the
floor — gateway spans, audits, and caller-scoped routing only saw the
minted user JWT, not the caller advertised by the HTTP client. The
tasks/resubscribe cursor extractor also ignored 'lastSeq' (the
canonical name used by a2a-nats-http/stdio) and the older
'metadata.lastEventId' SSE form, so reconnecting clients silently
resumed from sequence 0 and either replayed or skipped events. Lastly,
Response::builder() failures were misattributed to NatsPublish, which
read like a transport problem in logs/metrics; routing them through a
new ResponseBuild variant keeps the source of failure honest.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c168158. Configure here.

Comment thread rsworkspace/crates/a2a-bridge/src/main.rs
Production bootstrap always built AppState with default_a2a_prefix
('a2a'), so a non-default deployment would publish gateway subjects
and JetStream stream names that did not match a2a-nats-http,
a2a-nats-stdio, or a2a-nats-server in the same stack — the rest of
the stack reads ENV_A2A_PREFIX, the bridge silently didn't.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis merged commit 707efba into main Jun 22, 2026
6 of 7 checks passed
@yordis
yordis deleted the yordis/feat-a2a-bridge-inbound branch June 22, 2026 02:21
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.

1 participant