fix(jsonrpc): prefer a populated content key when decoding a Part - #1061
Open
rmlopes wants to merge 1 commit into
Open
fix(jsonrpc): prefer a populated content key when decoding a Part#1061rmlopes wants to merge 1 commit into
rmlopes wants to merge 1 commit into
Conversation
rmlopes
marked this pull request as ready for review
August 13, 2026 01:05
The discriminator scan took the first content key that was merely non-null, so a producer that emits every key of the flattened oneOf with the unset ones as "" lost its payload to whichever empty placeholder came first on the wire. The comment above it already promised "skipping null/empty values"; only null was ever skipped. This fixes a2aproject#1062
rmlopes
force-pushed
the
fix-part-empty-content-key-discriminator
branch
from
August 13, 2026 01:10
c0082af to
54a1516
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Partcontent keys over empty-string placeholders.Root cause
The discriminator selected the first recognized non-null content key. Some protobuf JSON producers emit every flattened oneOf key and represent unset strings as
"", causing an empty placeholder to hide the populated payload.Validation
PartSerializationTest.This fixes #1062