Repository navigation
fix(compat): treat a v0.3 history_length of 0 as unlimited in JSON-RPC and REST - #1312
Open
ConnorMoss02 wants to merge 2 commits into
Open
ConnorMoss02 wants to merge 2 commits into
ConnorMoss02 wants to merge 2 commits into
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/cluster/database_event_stream.py | 96.94% | 92.86% | 🔴 -4.08% |
| Total | 93.17% | 93.13% | 🔴 -0.04% |
Generated by coverage-comment.yml
Iwaniukooo11
requested changes
Oct 14, 2026
| ) | ||
| ) | ||
| if compat_config.history_length is not None: | ||
| if compat_config.history_length: |
Member
There was a problem hiding this comment.
Nit: Add a small comment here (e.g., 0 = unlimited) to make the behavior explicit for future readers and avoid accidental rewrites.
| core_req = pb2_v10.GetTaskRequest() | ||
| core_req.id = compat_req.params.id | ||
| if compat_req.params.history_length is not None: | ||
| if compat_req.params.history_length: |
This branch has not been deployed
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.
Problem
to_core_send_message_configurationandto_core_get_task_requestpassed a v0.3history_lengthof 0 through as a limit, so v0.3 JSON-RPC and REST GetTask returned tasks with empty history. In v0.3, 0 means unlimited.Fix
Skip
history_lengthwhen it is 0, as the gRPC path already does since #1306.Follow-up to #1306 from the review there.
Tests
test_send_message_configuration_conversion_history_length_zeroandtest_get_task_request_conversion_history_length_zerointest_conversions.py.Fixes #1311