Skip to content

fix(grpc): send every value of a service parameter - #457

Merged
muscariello merged 1 commit into
mainfrom
stack/14-grpc-repeated-service-params
Nov 3, 2026
Merged

muscariello merged 1 commit into
mainfrom
stack/14-grpc-repeated-service-params

Conversation

@muscariello

Copy link
Copy Markdown
Member

Fixes #427. Replaces #428.

Cause: service_params_to_metadata called MetadataMap::insert once per value, and insert replaces. A2A-Extensions: [urn:a, urn:b] reached the server as urn:b.

Fix: each value becomes its own metadata entry (append), as the Go client sends them. The Rust, Python and .NET servers read repeated entries. §10.2 asks for one comma-joined entry, but the Go server does not split it (a2aproject/a2a-go#516), so joining would hide every extension from a Go server. Both forms are valid gRPC metadata.

Tests: test_service_params_to_metadata_ascii now expects x-multi as two entries, and test_extract_service_params_repeated_entries pins that the server reads them.

Unproven: #428 says the A2A 1.1 line has the same per-value insert; not checked here.

`service_params_to_metadata` called `MetadataMap::insert` once per value,
and `insert` replaces the previous value, so only the last one went out:
`A2A-Extensions: [urn:a, urn:b]` reached the server as `urn:b`. Each value
is now its own metadata entry, as the Go client sends them. The Rust,
Python and .NET servers read repeated entries; the Go server does not
split a comma-joined value (§10.2), so joining would hide every extension
from it.

Signed-off-by: gulldan <[email protected]>
Signed-off-by: Luca Muscariello <[email protected]>
@muscariello
muscariello requested a review from a team as a code owner November 2, 2026 22:39
@muscariello
muscariello added this pull request to stack #460 November 2, 2026 22:40
@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@muscariello
muscariello added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit c826a6f Nov 3, 2026
22 checks passed
@muscariello
muscariello deleted the stack/14-grpc-repeated-service-params branch November 3, 2026 08:17
@github-actions github-actions Bot mentioned this pull request Nov 3, 2026
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.

[Bug]: a2a-grpc client sends only the last value of a multi-valued service parameter

3 participants