Repository navigation
fix(server): apply historyLength to streamed task snapshots - #463
Merged
muscariello merged 1 commit intoNov 3, 2026
Merged
muscariello merged 1 commit into
muscariello merged 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
lgecse
previously approved these changes
Nov 3, 2026
send_message trims the task it returns to configuration.historyLength,
but send_streaming_message returned the execution stream as it was, so
every Task in the stream carried the whole history. The proto binds the
cap to the response ("the server MUST NOT return more messages than the
provided value"), so the stream now trims each Task event the same way.
Signed-off-by: gulldan <5641375+gulldan@users.noreply.github.com>
muscariello
force-pushed
the
stack/18-stream-history-length
branch
from
November 3, 2026 11:16
f27f896 to
00015b3
Compare
lgecse
approved these changes
Nov 3, 2026
Open
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.
Fixes #435. Replaces #436.
Cause:
send_messagetrims the task it returns toconfiguration.historyLength, butsend_streaming_messagereturned the execution stream as it was, so everyTaskin the stream carried the whole history. The proto (SendMessageConfiguration.history_length) says the server MUST NOT return more messages than the value.Fix:
send_streaming_messagemaps the stream and trims eachTaskevent with the sameapply_history_length. Status and artifact updates carry no history and pass through.Tests:
test_streamed_task_snapshots_respect_history_length: an executor yields aTaskwith three history messages, and withhistoryLength: 1the stream carries one. It fails with the fix reverted.Unproven: the Python SDK trims both send and stream; the Go SDK ignores
historyLengthon both, so this would not match it. #436 says the A2A 1.1handler/split conflicts with this diff; not checked here.