fix(slimrpc): migrate a2a-slimrpc onto slim 0.14 native crates - #109
Conversation
Bump the slim family to the 0.14 release (auth 0.14.0, rpc 2.0.0-alpha.7, service 0.11.6, datapath 0.16.7, config 0.12.6) so a2a-slimrpc picks up the JWKS multi-key key-selection fix in agntcy-slim-auth (a token verifies against the right key in a multi-key allow-list instead of only the first). slim-rpc alpha.7 changed the public API, so migrate to it: - client: `Channel::call_unary_async` / `call_unary_stream_async` -> `Channel::unary` / `unary_stream` (typed over `Encoder`/`Decoder`, used here with pass-through `Vec<u8>`). `unary_stream` returns a `&self`-bound stream, so drive it inside an `async_stream` generator owning a channel clone to keep the returned `Transport` stream `'static`. - server: `register_unary_unary_internal` / `register_unary_stream_internal` -> the now-public `register_unary_unary` / `register_unary_stream`. - tests: `Server::new_internal`/`serve_async`/`shutdown_async` -> `Server::new`/`serve`/`shutdown`. Public API of a2a-slimrpc (SlimRpcTransport, SlimRpcHandler) is unchanged. Bumps a2a-slimrpc to 0.2.2. Adds async-stream. All unit + e2e tests pass. Signed-off-by: Luca Muscariello <muscariello@ieee.org>
There was a problem hiding this comment.
Code Review
This pull request updates the a2a-slimrpc crate to adapt to the new slim_rpc API, replacing internal and async-suffixed methods (such as call_unary_async and register_unary_unary_internal) with their simplified counterparts. It also introduces the async-stream dependency to resolve lifetime issues when returning streams from SlimRpcTransport. The review feedback highlights a discrepancy between the dependency versions specified in Cargo.toml and those locked in Cargo.lock (specifically for slim_rpc, slim_service, and slim_datapath), suggesting they be aligned.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| slim_rpc = { package = "agntcy-slim-rpc", version = "2.0.0-alpha.6" } | ||
| slim_config = { package = "agntcy-slim-config", version = "0.12.6" } | ||
| slim_service = { package = "agntcy-slim-service", version = "0.11.5", features = [ | ||
| "session", | ||
| ] } | ||
| slim_datapath = { package = "agntcy-slim-datapath", version = "0.16.5" } | ||
| slim_auth = { package = "agntcy-slim-auth", version = "0.13.0" } | ||
| slim_datapath = { package = "agntcy-slim-datapath", version = "0.16.6" } |
There was a problem hiding this comment.
There is a version discrepancy between the dependencies specified in Cargo.toml and those locked in Cargo.lock (and mentioned in the PR description).
Specifically:
slim_rpcis specified as2.0.0-alpha.6but locked as2.0.0-alpha.7.slim_serviceis specified as0.11.5but locked as0.11.6.slim_datapathis specified as0.16.6but locked as0.16.7.
Updating these to match the locked versions ensures consistency and avoids potential dependency resolution issues for downstream consumers.
| slim_rpc = { package = "agntcy-slim-rpc", version = "2.0.0-alpha.6" } | |
| slim_config = { package = "agntcy-slim-config", version = "0.12.6" } | |
| slim_service = { package = "agntcy-slim-service", version = "0.11.5", features = [ | |
| "session", | |
| ] } | |
| slim_datapath = { package = "agntcy-slim-datapath", version = "0.16.5" } | |
| slim_auth = { package = "agntcy-slim-auth", version = "0.13.0" } | |
| slim_datapath = { package = "agntcy-slim-datapath", version = "0.16.6" } | |
| slim_rpc = { package = "agntcy-slim-rpc", version = "2.0.0-alpha.7" } | |
| slim_config = { package = "agntcy-slim-config", version = "0.12.6" } | |
| slim_service = { package = "agntcy-slim-service", version = "0.11.6", features = [ | |
| "session", | |
| ] } | |
| slim_datapath = { package = "agntcy-slim-datapath", version = "0.16.7" } |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Specify rpc 2.0.0-alpha.7 / service 0.11.6 / datapath 0.16.7 to match the lockfile. The previous minimums (alpha.6 / 0.11.5 / 0.16.6) could not resolve alongside slim_auth 0.14.0 anyway (they cap at auth <0.14), so the manifest now honestly reflects what the auth 0.14 pin forces. Addresses PR review feedback. Signed-off-by: Luca Muscariello <muscariello@ieee.org>
Why
The slim 0.14 release carries a fix in
agntcy-slim-authfor JWKS multi-key key selection (a token now verifies against the correct key in a multi-key allow-list instead of only the first — agntcy/slim#1882 / #1883). Consuming it requires the whole slim family at 0.14, andslim-rpc alpha.7(the only rpc that depends onauth ^0.14) changed its public API — so this is a real migration, not just a version bump.Changes
Bump the workspace slim pins to the 0.14 family (auth 0.14.0, rpc 2.0.0-alpha.7, service 0.11.6, datapath 0.16.7, config 0.12.6) and migrate
a2a-slimrpcto the new rpc API:Channel::call_unary_async/call_unary_stream_async→Channel::unary/unary_stream(now typed overEncoder/Decoder; used here with pass-throughVec<u8>).unary_streamreturns a&self-bound stream, so it's driven inside anasync_streamgenerator that owns a channel clone, keeping theTransportstream'static.register_unary_unary_internal/register_unary_stream_internal→ the now-publicregister_unary_unary/register_unary_stream.Server::new_internal/serve_async/shutdown_async→Server::new/serve/shutdown.The public API of
a2a-slimrpc(SlimRpcTransport,SlimRpcHandler) is unchanged. Bumpsa2a-slimrpcto 0.2.2; addsasync-stream.Test
cargo test -p a2a-slimrpc— 15 unit + 3 e2e (live SLIM round-trip incl. streaming) pass; clippy--all-targetsclean; fmt clean; workspace builds.