Repository navigation
fix(wrapper): finalize HTTP bodies on trailers and support streaming trailer pauses - #57
Open
EndlessSeeker wants to merge 2 commits into
Open
EndlessSeeker wants to merge 2 commits into
EndlessSeeker wants to merge 2 commits into
Conversation
4 of 12 tasks
EndlessSeeker
force-pushed
the
codex/a2a-trailers-pr
branch
from
September 6, 2026 07:39
3581354 to
5ce5f98
Compare
EndlessSeeker
marked this pull request as ready for review
September 6, 2026 07:40
…er pauses Change-Id: I11f364b7daa8dc1f4561abbab0f70502bf2f94e6 Signed-off-by: EndlessSeeker <1766508902@qq.com>
Change-Id: I687cbf31b9d3a1a682b8a46f25febe89b3206939 Signed-off-by: EndlessSeeker <1766508902@qq.com>
EndlessSeeker
force-pushed
the
codex/a2a-trailers-pr
branch
from
September 6, 2026 11:21
5ce5f98 to
310bc00
Compare
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.
Summary
Buffered request/response handlers currently miss messages that end in HTTP trailers instead of a DATA end-of-stream flag. This can skip request validation and response metadata/Card rewriting. Finalize these bodies exactly once on either termination path, preserving the handler's pause/continue action.
Also add
ProcessResponseTrailersso a streaming handler can hold trailers until preceding asynchronous body work completes. Streaming responses do not invoke the buffered body handler.Verification
go test ./...passes on Linux/amd64 with Go 1.26.5, including empty and multi-chunk bodies, once-only finalization, action propagation, and streaming trailer pauses.get_log_levelhost function in the emulator.35813546bdbe882693a4a37c8e1e736e34c78210is retained oncodex/a2a-trailers-testedfor the public module pin. PR head310bc001694a501badbaca42d99b1fc7143016a6has the identical source tree; only author/committer and DCO sign-off metadata changed (git diff 35813546bdbe882693a4a37c8e1e736e34c78210 310bc001694a501badbaca42d99b1fc7143016a6is empty).Agent disclosure
Implemented and tested with OpenAI Codex at maintainer EndlessSeeker's request. The request was to validate A2A client/server communication through Higress, including HTTP/2 trailers and stateful endpoint affinity. No protocol-specific logic is added to the SDK.