Skip to content

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

Open
ConnorMoss02 wants to merge 1 commit into
a2aproject:mainfrom
ConnorMoss02:fix/v03-history-length-zero
Open

ConnorMoss02 wants to merge 1 commit 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 96.94% 92.86% 🔴 -4.08%
src/a2a/server/events/event_queue_v2.py 91.79% 92.27% 🟢 +0.48%
src/a2a/utils/telemetry.py 90.70% 91.47% 🟢 +0.78%
Total 93.03% 93.01% 🔴 -0.02%

Generated by coverage-comment.yml

This branch has not been deployed

No deployments
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

1 participant