Skip to content

fix!: Rename blocking to returnImmediately in SendMessageConfiguration#722

Merged
kabir merged 2 commits intoa2aproject:mainfrom
ehsavoie:a2a_1.0
Mar 11, 2026
Merged

fix!: Rename blocking to returnImmediately in SendMessageConfiguration#722
kabir merged 2 commits intoa2aproject:mainfrom
ehsavoie:a2a_1.0

Conversation

@ehsavoie
Copy link
Collaborator

Sync a2a.proto with upstream (dec790a -> 601c408).

The blocking field in SendMessageConfiguration has been renamed to return_immediately with inverted semantics:

  • blocking=true (wait) -> returnImmediately=false
  • blocking=false (return immediately) -> returnImmediately=true

The default behavior changed: false now means "wait for completion" instead of "return immediately".

BREAKING CHANGE: MessageSendConfiguration.blocking() renamed to returnImmediately(). Builder method .blocking(boolean) renamed to .returnImmediately(boolean) with inverted value. JSON wire format field changed from "blocking" to "returnImmediately".

@ehsavoie ehsavoie requested review from jmesnil and kabir and removed request for kabir March 11, 2026 10:38
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a breaking change by renaming the blocking field within the SendMessageConfiguration to returnImmediately. This change aligns with an upstream protocol update and involves an inversion of the field's semantics. Consequently, the default behavior for message sending has shifted, with returnImmediately=false now signifying a wait for task completion. The modifications span the core client and server logic, Protobuf definitions, and associated test suites to ensure consistency with the new naming and behavior.

Highlights

  • Field Renaming and Semantic Inversion: The blocking field in SendMessageConfiguration has been renamed to returnImmediately. This change also inverts the field's semantics: blocking=true now maps to returnImmediately=false, and blocking=false maps to returnImmediately=true.
  • Default Behavior Change: The default behavior for message sending has changed. Previously, blocking=false meant 'return immediately'. Now, returnImmediately=false means 'wait for completion'.
  • Breaking Change Notification: This update is a breaking change, affecting the MessageSendConfiguration.blocking() method (renamed to returnImmediately()) and the JSON wire format field, which changed from "blocking" to "returnImmediately".
  • Widespread Codebase Updates: Modifications have been applied across the client, server, and specification layers, including Java source files, Protobuf definitions, and numerous test cases, to reflect the new field name and its inverted logic.
Changelog
  • client/base/src/main/java/io/a2a/client/Client.java
    • Updated createMessageSendConfiguration to use returnImmediately with inverted logic based on isPolling().
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportStreamingTest.java
    • Updated test cases to use returnImmediately(true) instead of blocking(false).
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java
    • Updated test cases to use returnImmediately(false) instead of blocking(true).
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java
    • Updated JSON message payloads to use "returnImmediately":false instead of "blocking":true.
  • client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java
    • Updated test cases to use returnImmediately(true) instead of blocking(false).
  • reference/jsonrpc/src/test/java/io/a2a/server/apps/quarkus/A2AServerRoutesTest.java
    • Updated JSON configuration in test requests to use "returnImmediately":false instead of "blocking":true.
  • server-common/src/main/java/io/a2a/server/agentexecution/RequestContext.java
    • Updated Javadoc and code snippet to reference returnImmediately instead of blocking.
  • server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java
    • Refactored logic to use returnImmediately from MessageSendParams and derive blocking from it.
    • Updated debug logging messages to reflect the returnImmediately field.
  • server-common/src/test/java/io/a2a/server/agentexecution/RequestContextTest.java
    • Updated defaultConfiguration() to set returnImmediately(true) instead of blocking(false).
  • server-common/src/test/java/io/a2a/server/requesthandlers/DefaultRequestHandlerTest.java
    • Updated DEFAULT_CONFIG to set returnImmediately(true) instead of blocking(false).
  • spec-grpc/src/main/java/io/a2a/grpc/A2A.java
    • Updated the generated Java code for the Protobuf definition to reflect the returnImmediately field name.
  • spec-grpc/src/main/java/io/a2a/grpc/OAuthFlows.java
    • Updated line number references in deprecated comments due to changes in the a2a.proto file.
  • spec-grpc/src/main/java/io/a2a/grpc/OAuthFlowsOrBuilder.java
    • Updated line number references in deprecated comments due to changes in the a2a.proto file.
  • spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfiguration.java
    • Renamed the internal field blocking_ to returnImmediately_.
    • Updated getter, setter, and builder methods to use returnImmediately.
  • spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfigurationOrBuilder.java
    • Renamed the getBlocking() method to getReturnImmediately().
  • spec-grpc/src/main/proto/a2a.proto
    • Updated the commit reference in the file header.
    • Renamed the blocking field to return_immediately in SendMessageConfiguration.
    • Updated comments for the return_immediately field to reflect its new semantics.
  • spec-grpc/src/test/java/io/a2a/grpc/mapper/A2ACommonFieldMapperTest.java
    • Updated JSON string in test to use "returnImmediately": true instead of "blocking": true.
  • spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java
    • Updated assertion to check getReturnImmediately() instead of getBlocking().
  • spec/src/main/java/io/a2a/spec/MessageSendConfiguration.java
    • Renamed the blocking parameter in the record definition to returnImmediately.
    • Updated Javadoc for the returnImmediately parameter and the builder method.
    • Renamed the blocking() builder method to returnImmediately().
  • tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
    • Updated comments to reflect that polling mode now translates to returnImmediately=true.
  • transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java
    • Updated defaultConfiguration() to set returnImmediately(true) instead of blocking(false).
  • transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java
    • Updated JSON configuration in test requests to use "returnImmediately":false instead of "blocking":true.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly renames the blocking field to returnImmediately in SendMessageConfiguration and inverts its semantics as described. The changes have been consistently applied across the proto files, Java data models, builders, and associated tests. The update to the default behavior is also correctly implemented. I've found one minor inconsistency in a test case's JSON payload, which I've left a comment on. Other than that, the changes look good.

Note: Security Review did not run due to the size of the PR.

" },\n" +
" \"configuration\": {\n" +
" \"blocking\": true\n" +
" \"returnImmediately\": true\n" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The conversion from blocking to returnImmediately seems incorrect here. The original value was "blocking": true, which means the operation should wait. According to the PR description, this should be converted to "returnImmediately": false. The current change to "returnImmediately": true inverts the behavior of this test request from "wait" to "return immediately". While this test might pass as it doesn't assert on this specific value, it's semantically incorrect and could be confusing.

Suggested change
" \"returnImmediately\": true\n" +
" \"returnImmediately\": false\n" +

…ation

Sync a2a.proto with upstream (dec790a -> 601c408).

The `blocking` field in `SendMessageConfiguration` has been renamed to
`return_immediately` with inverted semantics:
- `blocking=true` (wait) -> `returnImmediately=false`
- `blocking=false` (return immediately) -> `returnImmediately=true`

The default behavior changed: `false` now means "wait for completion"
instead of "return immediately".

BREAKING CHANGE: `MessageSendConfiguration.blocking()` renamed to
`returnImmediately()`. Builder method `.blocking(boolean)` renamed to
`.returnImmediately(boolean)` with inverted value. JSON wire format
field changed from `"blocking"` to `"returnImmediately"`.

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
@kabir
Copy link
Collaborator

kabir commented Mar 11, 2026

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly renames the blocking field to returnImmediately in SendMessageConfiguration and consistently applies the inverted logic throughout the codebase. The change, including the modification of the default behavior to blocking, is well-documented in the pull request description. The updates span across domain models, transport layers, generated code from protobuf definitions, and tests, ensuring consistency. I have one suggestion to improve logging clarity in the DefaultRequestHandler.

Note: Security Review did not run due to the size of the PR.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@kabir kabir merged commit 5af2b29 into a2aproject:main Mar 11, 2026
11 checks passed
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.

2 participants