Repository navigation
fix(a2a-pb): keep the REQUIRED fields of ListTasksResponse and AgentCard - #446
Merged
muscariello merged 1 commit intoNov 2, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
muscariello
force-pushed
the
stack/07-protojson-required-fields
branch
from
November 2, 2026 12:00
c089c58 to
dbb638a
Compare
muscariello
force-pushed
the
stack/07-protojson-required-fields
branch
from
November 2, 2026 12:02
dbb638a to
a0e2f6d
Compare
proto3-JSON leaves out fields at their default, so an empty ListTasks page
came out as {"nextPageToken":"","pageSize":50} and an extended card without
skills or modes lost skills, defaultInputModes and defaultOutputModes.
Section 5.7 says REQUIRED fields MUST be present. The ListTasksResponse
normalisation that already restores nextPageToken now restores tasks,
pageSize and totalSize too, and AgentCard gets the same for its REQUIRED
top-level fields.
Signed-off-by: gulldan <5641375+gulldan@users.noreply.github.com>
muscariello
force-pushed
the
stack/07-protojson-required-fields
branch
from
November 2, 2026 14:28
a0e2f6d to
42525ff
Compare
msardara
approved these changes
Nov 2, 2026
Open
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.
Fixes #415. Replaces #416. Stacked on #445: review only the last commit.
Cause: proto3-JSON omits default values, so an empty
ListTaskspage losttasksandtotalSize, and an agent card without skills or modes lostskills,defaultInputModes,defaultOutputModesand an emptydescription. §5.7 says REQUIRED fields MUST be present.Fix:
ListTasksResponse::normalize_json, which already restoresnextPageToken, now restores all four REQUIRED fields through a smallinsert_requiredhelper, andAgentCardgets the same for its REQUIRED top-level fields. Values that are present are never touched, and decoding is unchanged. Nested messages, such as anAgentSkillwith notags, are not covered.Tests: two new tests in
protojson_conv.rs: an emptyListTasksResponsekeeps all four fields, and anAgentCardwith empty skills, modes and description keeps every REQUIRED key and round-trips.Unproven: the failures on
mainand thehelloworld-serveroutput quoted in #416 were not run locally. CI is the check.