Skip to content

fix(jsonrpc): avoid wrapping tasks in list responses#998

Open
014-code wants to merge 1 commit into
a2aproject:mainfrom
014-code:fix/843-list-tasks-json-serialization
Open

fix(jsonrpc): avoid wrapping tasks in list responses#998
014-code wants to merge 1 commit into
a2aproject:mainfrom
014-code:fix/843-list-tasks-json-serialization

Conversation

@014-code

Copy link
Copy Markdown

Summary

  • Prevent StreamingEventKind serialization from wrapping concrete Task values inside ordinary List<Task> payloads.
  • Add exact EventKind handling so SendMessageResponse oneof results still keep the expected task/message wrapper.
  • Add explicit streaming-event serialization for push notification payloads.

Related Issue

This fixes #843.

Tests

  • Added regression coverage for ListTasksResult and ListTasksResponse to ensure tasks[] items serialize as direct task objects without an extra task wrapper.
  • Added coverage to ensure SendMessageResponse still keeps the EventKind wrapper.
  • Updated existing streaming-event serialization tests to use the explicit streaming serializer.

Passed:

  • mvn -pl jsonrpc-common -am -Dtest=TaskSerializationTest,StreamingEventKindSerializationTest -Dsurefire.failIfNoSpecifiedTests=false test -B -ntp -Dstyle.color=never
  • mvn -pl server-common,extras/queue-manager-replicated/core -am -Dtest=PushNotificationSenderTest,EventSerializationTest -Dsurefire.failIfNoSpecifiedTests=false test -B -ntp -Dstyle.color=never

Register EventKind and StreamingEventKind adapters only for their declared interface types so List<Task> serializes task fields directly while JSON-RPC oneof results and streaming events keep their wrapper shape.

Add regression coverage for ListTasksResult/ListTasksResponse serialization and keep push notification streaming payload coverage passing.

This fixes a2aproject#843
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]: Client SDK and Server SDK expect different objects for Tasks

1 participant