Skip to content

fix(compat): treat a v0.3 history_length of 0 as unlimited in JSON-RPC and REST - #1312

Merged
Iwaniukooo11 merged 3 commits into
a2aproject:mainfrom
ConnorMoss02:fix/v03-history-length-zero
Oct 16, 2026
Merged

Iwaniukooo11 merged 3 commits into
a2aproject:mainfrom
ConnorMoss02:fix/v03-history-length-zero

Conversation

@ConnorMoss02

Copy link
Copy Markdown
Contributor

Problem

to_core_send_message_configuration and to_core_get_task_request passed a v0.3 history_length of 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_length when 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_zero and test_get_task_request_conversion_history_length_zero in test_conversions.py.

Fixes #1311

@ConnorMoss02
ConnorMoss02 requested a review from a team as a code owner October 4, 2026 20:18
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/cluster/database_event_stream.py 92.86% 96.94% 🟢 +4.08%
Total 93.13% 93.17% 🟢 +0.04%

Generated by coverage-comment.yml

Comment thread src/a2a/compat/v0_3/conversions.py
Comment thread src/a2a/compat/v0_3/conversions.py

@Iwaniukooo11 Iwaniukooo11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Iwaniukooo11
Iwaniukooo11 merged commit e86695c into a2aproject:main Oct 16, 2026
17 checks passed
mykytanetipa pushed a commit that referenced this pull request Oct 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.2.3](v1.2.2...v1.2.3)
(2026-10-17)


### Bug Fixes

* **client:** ignore the patch version when preferring a 1.0 interface
([#1304](#1304))
([cbb2d84](cbb2d84))
* **client:** normalize malformed agent card parsing errors
([#1307](#1307))
([486f0f6](486f0f6))
* **compat:** block on a v0.3 gRPC and REST send without configuration
([#1334](#1334))
([8160310](8160310)),
closes [#1321](#1321)
* **compat:** treat a v0.3 history_length of 0 as unlimited in JSON-RPC
and REST ([#1312](#1312))
([e86695c](e86695c))
* **jcs:** count open containers for the nesting bound, so an empty
container leaf is refused
([#1294](#1294))
([5653daf](5653daf))
* **server:** isolate push notification failures from the task lifecycle
([#1329](#1329))
([0ee47d7](0ee47d7))
* **server:** mark internal lifecycle events done so a cancelled stream
frees its producer
([#1336](#1336))
([a4c4fc9](a4c4fc9))
* **server:** reject push URLs in shared address space
([#1326](#1326))
([01da00b](01da00b))
* **server:** release the ActiveTask after a direct Message response
([#1297](#1297))
([49ebce6](49ebce6))
* **server:** run follow-up messages in the sender's contextvars
([#1317](#1317))
([a016002](a016002))
* **server:** warn when an AgentCard is missing required fields
([#1279](#1279))
([4f4101c](4f4101c))
* **telemetry:** let trace_function alone decide a span's status
([#1309](#1309))
([59dcbfb](59dcbfb))

---
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.

v0.3 JSON-RPC and REST GetTask return no history when history_length is 0

2 participants