Skip to content

Conversation

@yarolegovich
Copy link
Member

@yarolegovich yarolegovich commented Sep 15, 2025

Description

Both fields are optional in types.ts and jsonrpc schema.
For both cases it might be useful to differentiate 0 and unset. For example:

  1. A client calls GetTask and doesn't want History to be fetched / included in the response.
  2. A client calls SendMessage and doesn't want history to be persisted at all.

The change is backward-compatible and makes it possible for a2a servers to provide consistent behavior regardless of the selected transport.

Fixes #1072

@yarolegovich yarolegovich requested a review from a team as a code owner September 15, 2025 18:31
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.

Summary of Changes

Hello @yarolegovich, 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 enhances the flexibility of history management within the a2a system by making the history_length field optional in key gRPC message definitions: SendMessageConfiguration and GetTaskRequest. This update allows clients to precisely control whether history is fetched or persisted, differentiating between a zero value and an unset state. The change ensures consistency across various communication transports, including gRPC and JSON-RPC, and is fully backward-compatible.

Highlights

  • gRPC Field Optionality: The history_length field in both SendMessageConfiguration and GetTaskRequest gRPC messages has been updated from a required int32 to an optional int32. This allows for explicit differentiation between a zero value (e.g., unlimited history) and an unset value (e.g., no history desired).
  • Consistency Across Transports: This change aligns the gRPC specification with existing types.ts and JSON-RPC schemas, where history_length is already optional. This ensures a2a servers can provide consistent behavior regarding history handling, regardless of the communication transport used.
  • Backward Compatibility: The modification is backward-compatible, meaning existing clients will continue to function without issues, while new clients can leverage the enhanced control offered by the optional field.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 makes the history_length field optional in SendMessageConfiguration and GetTaskRequest to align with the JSON-RPC specification and provide more flexibility. The change is logical and well-justified. My review includes suggestions to improve the comments for these fields to clearly document the behavior when the field is unset, which is important for API consumers.

@holtskinner holtskinner added the TSC Review To be reviewed by the Technical Steering Committee label Sep 29, 2025
@ToddSegal
Copy link
Contributor

cleanup for 1.0 needs this.

recommend we vote

/vote

@git-vote
Copy link

git-vote bot commented Nov 10, 2025

Vote created

@ToddSegal has called for a vote on fix(grpc): make history_length optional (#1071).

The members of the following teams have binding votes:

Team
@a2aproject/a2a-tsc

Non-binding votes are also appreciated as a sign of support!

How to vote

You can cast your vote by reacting to this comment. The following reactions are supported:

In favor Against Abstain
👍 👎 👀

Please note that voting for multiple options is not allowed and those votes won't be counted.

The vote will be open for 7days. It will pass if at least 51% of the users with binding votes vote In favor 👍. Once it's closed, results will be published here as a new comment.

@git-vote
Copy link

git-vote bot commented Nov 11, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
ToddSegal In favor 2025-11-10 21:42:05.0 +00:00:00
darrelmiller In favor 2025-11-10 22:13:44.0 +00:00:00
muscariello In favor 2025-11-10 23:01:30.0 +00:00:00
@lerhaupt Pending
@geneknit Pending
@hughesthe1st Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

@git-vote
Copy link

git-vote bot commented Nov 12, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
ToddSegal In favor 2025-11-10 21:42:05.0 +00:00:00
darrelmiller In favor 2025-11-10 22:13:44.0 +00:00:00
muscariello In favor 2025-11-10 23:01:30.0 +00:00:00
@lerhaupt Pending
@geneknit Pending
@hughesthe1st Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

lkawka added a commit to a2aproject/a2a-python that referenced this pull request Nov 13, 2025
# Description

The specification states that a history length of 0 should return
unlimited results (see
[code](https://github.com/a2aproject/A2A/blob/202aa069e66f701bacf2156d42d8916fc96a5188/specification/grpc/a2a.proto#L128-L130)).
However, this was recently changed to return 0 results. This fix
restores the correct behavior.

Please note that there is an outstanding proposal to change this
behavior. See a2aproject/A2A#1071 for more
details.

Prerequisites:
- [x] Follow the [`CONTRIBUTING`
Guide](https://github.com/a2aproject/a2a-python/blob/main/CONTRIBUTING.md).
- [x] Make your Pull Request title in the
<https://www.conventionalcommits.org/> specification.
- Important Prefixes for
[release-please](https://github.com/googleapis/release-please):
- `fix:` which represents bug fixes, and correlates to a
[SemVer](https://semver.org/) patch.
- `feat:` represents a new feature, and correlates to a SemVer minor.
- `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking
change (indicated by the `!`) and will result in a SemVer major.
- [x] Ensure the tests and linter pass (Run `bash scripts/format.sh`
from the repository root to format)
- [x] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕
@git-vote
Copy link

git-vote bot commented Nov 13, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
ToddSegal In favor 2025-11-10 21:42:05.0 +00:00:00
darrelmiller In favor 2025-11-10 22:13:44.0 +00:00:00
muscariello In favor 2025-11-10 23:01:30.0 +00:00:00
@lerhaupt Pending
@geneknit Pending
@hughesthe1st Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

3 similar comments
@git-vote
Copy link

git-vote bot commented Nov 14, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
ToddSegal In favor 2025-11-10 21:42:05.0 +00:00:00
darrelmiller In favor 2025-11-10 22:13:44.0 +00:00:00
muscariello In favor 2025-11-10 23:01:30.0 +00:00:00
@lerhaupt Pending
@geneknit Pending
@hughesthe1st Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

@git-vote
Copy link

git-vote bot commented Nov 15, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
ToddSegal In favor 2025-11-10 21:42:05.0 +00:00:00
darrelmiller In favor 2025-11-10 22:13:44.0 +00:00:00
muscariello In favor 2025-11-10 23:01:30.0 +00:00:00
@lerhaupt Pending
@geneknit Pending
@hughesthe1st Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

@git-vote
Copy link

git-vote bot commented Nov 16, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
ToddSegal In favor 2025-11-10 21:42:05.0 +00:00:00
darrelmiller In favor 2025-11-10 22:13:44.0 +00:00:00
muscariello In favor 2025-11-10 23:01:30.0 +00:00:00
@lerhaupt Pending
@geneknit Pending
@hughesthe1st Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

@amye amye added this to TSC Review Nov 17, 2025
@amye amye moved this to Backlog in TSC Review Nov 17, 2025
@amye amye moved this from Backlog to In review in TSC Review Nov 17, 2025
@git-vote
Copy link

git-vote bot commented Nov 17, 2025

Vote closed

The vote did not pass.

37.50% of the users with binding vote were in favor and 0.00% were against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
@ToddSegal In favor 2025-11-10 21:42:05.0 +00:00:00
@darrelmiller In favor 2025-11-10 22:13:44.0 +00:00:00
@muscariello In favor 2025-11-10 23:01:30.0 +00:00:00

@git-vote git-vote bot removed the gitvote/open label Nov 17, 2025
@amye
Copy link
Contributor

amye commented Nov 18, 2025

/vote

@git-vote
Copy link

git-vote bot commented Nov 18, 2025

Vote created

@amye has called for a vote on fix(grpc): make history_length optional (#1071).

The members of the following teams have binding votes:

Team
@a2aproject/a2a-tsc

Non-binding votes are also appreciated as a sign of support!

How to vote

You can cast your vote by reacting to this comment. The following reactions are supported:

In favor Against Abstain
👍 👎 👀

Please note that voting for multiple options is not allowed and those votes won't be counted.

The vote will be open for 7days. It will pass if at least 51% of the users with binding votes vote In favor 👍. Once it's closed, results will be published here as a new comment.

@git-vote
Copy link

git-vote bot commented Nov 19, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
000-000-000-000-000 In favor 2025-11-18 17:06:02.0 +00:00:00
geneknit In favor 2025-11-18 17:06:51.0 +00:00:00
hughesthe1st In favor 2025-11-18 17:10:20.0 +00:00:00
@muscariello Pending
@darrelmiller Pending
@lerhaupt Pending
@ToddSegal Pending
@SivaNSAP Pending

1 similar comment
@git-vote
Copy link

git-vote bot commented Nov 20, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
000-000-000-000-000 In favor 2025-11-18 17:06:02.0 +00:00:00
geneknit In favor 2025-11-18 17:06:51.0 +00:00:00
hughesthe1st In favor 2025-11-18 17:10:20.0 +00:00:00
@muscariello Pending
@darrelmiller Pending
@lerhaupt Pending
@ToddSegal Pending
@SivaNSAP Pending

@holtskinner
Copy link
Member

@yarolegovich Be sure to rebase to main after the recent refactoring

@git-vote
Copy link

git-vote bot commented Nov 21, 2025

Vote status

So far 37.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
000-000-000-000-000 In favor 2025-11-18 17:06:02.0 +00:00:00
geneknit In favor 2025-11-18 17:06:51.0 +00:00:00
hughesthe1st In favor 2025-11-18 17:10:20.0 +00:00:00
@muscariello Pending
@darrelmiller Pending
@lerhaupt Pending
@ToddSegal Pending
@SivaNSAP Pending

@amye
Copy link
Contributor

amye commented Nov 21, 2025

Ping for this particular comment: #1071 (comment)

@muscariello
@darrelmiller
@lerhaupt
@ToddSegal
@SivaNSAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gitvote/open gitvote TSC Review To be reviewed by the Technical Steering Committee

Projects

Status: In Voting

Development

Successfully merging this pull request may close these issues.

[Bug]: history length is not optional in .proto

5 participants