Skip to content

fix: regenerate spec and fix returnImmediately#284

Merged
yarolegovich merged 4 commits intomainfrom
yarolegovich/return-immediately
Mar 16, 2026
Merged

fix: regenerate spec and fix returnImmediately#284
yarolegovich merged 4 commits intomainfrom
yarolegovich/return-immediately

Conversation

@yarolegovich
Copy link
Copy Markdown
Member

bring types up to date with the latest spec

@gemini-code-assist
Copy link
Copy Markdown
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 brings the API specification and its client/server implementations up to date with recent design changes. The core purpose is to improve the clarity of task completion behavior by replacing a generic 'Blocking' flag with a more descriptive 'ReturnImmediately' field. Additionally, the protobuf definitions have undergone a significant regeneration, streamlining the structure of push notification configurations and simplifying the associated gRPC method calls. These changes ensure better alignment with the evolving API design and enhance overall code maintainability.

Highlights

  • API Specification Update: The API specification has been regenerated to reflect the latest changes, ensuring all types and methods are up to date.
  • ReturnImmediately Field: The 'Blocking' field in 'SendMessageConfig' has been replaced with a more explicit 'ReturnImmediately' boolean, clarifying the behavior of immediate operation return.
  • Push Notification Configuration Refactoring: The 'PushNotificationConfig' message has been refactored, with its fields flattened directly into 'TaskPushNotificationConfig' in the protobuf definition, simplifying the structure.
  • gRPC Method Simplification: The 'CreateTaskPushNotificationConfig' gRPC method and its corresponding request type have been simplified to directly use the 'TaskPushNotificationConfig' message.
Changelog
  • .gitignore
    • Added a pattern to ignore temporary AI worktree directories.
  • a2a/core.go
    • Replaced the Blocking field with ReturnImmediately in the SendMessageConfig struct, updating its documentation and type.
  • a2aclient/client.go
    • Removed an unused import internal/utils.
    • Updated the withDefaultSendConfig method to set ReturnImmediately based on the blocking parameter.
  • a2aclient/client_test.go
    • Removed an unused import internal/utils.
    • Updated test cases to reflect the change from Blocking to ReturnImmediately.
  • a2acompat/a2av0/conversions.go
    • Added an import for internal/utils.
    • Modified the conversion logic between v0 and v1 SendMessageConfig to correctly map Blocking to ReturnImmediately and vice-versa.
  • a2agrpc/v1/handler.go
    • Modified the CreateTaskPushNotificationConfig gRPC handler method signature to directly accept *a2apb.TaskPushNotificationConfig instead of *a2apb.CreateTaskPushNotificationConfigRequest.
  • a2agrpc/v1/handler_test.go
    • Updated test cases for CreateTaskPushNotificationConfig to match the new request type and structure, removing the nested Config field.
  • a2apb/v0/pbconv/from_proto.go
    • Removed an unused import google.golang.org/protobuf/proto.
    • Updated fromProtoSendMessageConfig to use ReturnImmediately instead of Blocking.
  • a2apb/v0/pbconv/from_proto_test.go
    • Removed an unused import google.golang.org/protobuf/proto.
    • Updated test cases to reflect the change from Blocking to ReturnImmediately.
  • a2apb/v0/pbconv/to_proto.go
    • Updated toProtoSendMessageConfig to set Blocking based on the inverse of ReturnImmediately.
  • a2apb/v1/a2a.pb.go
    • Regenerated the protobuf file, replacing Blocking with ReturnImmediately in SendMessageConfiguration.
    • Removed the PushNotificationConfig message and flattened its fields into TaskPushNotificationConfig.
    • Updated message type indices.
  • a2apb/v1/a2a_grpc.pb.go
    • Updated the gRPC client and server interfaces for CreateTaskPushNotificationConfig to use *TaskPushNotificationConfig as the request type.
  • a2apb/v1/pbconv/from_proto.go
    • Removed an unused import google.golang.org/protobuf/proto.
    • Updated fromProtoPushConfig to accept *a2apb.TaskPushNotificationConfig.
    • Modified fromProtoSendMessageConfig and FromProtoCreateTaskPushConfigRequest to align with the new protobuf structure and ReturnImmediately field.
  • a2apb/v1/pbconv/from_proto_test.go
    • Updated test cases for fromProtoSendMessageConfig and fromProtoCreateTaskPushConfigRequest to match the new protobuf structure and ReturnImmediately field.
  • a2apb/v1/pbconv/to_proto.go
    • Updated toProtoPushConfig to return *a2apb.TaskPushNotificationConfig.
    • Modified toProtoSendMessageConfig and ToProtoCreateTaskPushConfigRequest to align with the new protobuf structure and ReturnImmediately field.
  • a2asrv/handler.go
    • Updated the shouldInterruptNonStreaming function to check the ReturnImmediately field instead of Blocking.
  • a2asrv/handler_test.go
    • Updated test cases for SendMessage_NonBlocking to use ReturnImmediately instead of Blocking.
  • buf.gen.yaml
    • Updated the ref to a newer commit hash, indicating a regeneration of the protobuf specification.
  • e2e/tck/sut.go
    • Modified the intercepter logic to set ReturnImmediately to true for SendMessageRequest configurations.
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
Copy Markdown
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 refactors the SendMessageConfig to replace the Blocking boolean field with a ReturnImmediately boolean, inverting its semantic meaning. This change is propagated across the a2a/core.go definition, a2aclient logic and tests, and a2acompat conversion functions. Additionally, the protobuf definition for push notification configurations (a2apb/v1/a2a.pb.go) is simplified by inlining the PushNotificationConfig fields directly into TaskPushNotificationConfig, removing the nested message. This simplification affects the gRPC handler, its tests, and the protobuf conversion logic in a2apb/v1/pbconv. A minor update to .gitignore was also included to ignore AI worktree directories.

@yarolegovich yarolegovich merged commit 2eee0b9 into main Mar 16, 2026
4 checks passed
@yarolegovich yarolegovich deleted the yarolegovich/return-immediately branch March 16, 2026 16:27
yarolegovich pushed a commit that referenced this pull request Mar 17, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.0.0](v1.0.0-alpha.3...v1.0.0)
(2026-03-17)


### Features

* implement the new rest error handling
([#282](#282))
([a3bda30](a3bda30))
* use v2 suffix for module ID and provide compat support
([#270](#270))
([dd1b6ba](dd1b6ba)),
closes [#250](#250)


### Bug Fixes

* a2asrv jsonrpc Content-Type
([#265](#265))
([2568a46](2568a46))
* bugs before going from alpha
([#279](#279))
([b1f055c](b1f055c))
* GetTaskRequest nil pointer assignment check
([#258](#258))
([440bb79](440bb79))
* inject headers into service params
([#277](#277))
([d33f3bd](d33f3bd)),
closes [#275](#275)
* propagate cancelation signal using task store
([#272](#272))
([5e1d462](5e1d462)),
closes [#245](#245)
* regenerate spec and fix returnImmediately
([#284](#284))
([2eee0b9](2eee0b9))
* task modified after save
([#266](#266))
([c15febe](c15febe))
* taskupdater result mutable
([#274](#274))
([6038d92](6038d92))
* update pushsender
([#256](#256))
([5f7a594](5f7a594))
* use enum values as in the spec
([#261](#261))
([eb98981](eb98981)),
closes [#251](#251)


### Documentation

* **a2asrv:** add Example_* test functions for pkg.go.dev documentation
([#262](#262))
([7888e37](7888e37))
* add example tests a2a
([#240](#240))
([4fe08a9](4fe08a9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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