Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/client/transports/http_helpers.py | 92.21% | 92.31% | 🟢 +0.10% |
| src/a2a/server/cluster/database_event_stream.py | 97.27% | 93.64% | 🔴 -3.64% |
| Total | 94.30% | 94.27% | 🔴 -0.03% |
Generated by coverage-comment.yml
ConnorMoss02
reviewed
Dec 1, 2026
ConnorMoss02
left a comment
Contributor
There was a problem hiding this comment.
Ran it locally and the profile= and -custom cases fail on main and pass here. Nothing else under src checks for event-stream so this covers it. LGTM.
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.
Description
send_http_stream_request()previously detected SSE streams using a substring check ('text/event-stream' not in content_type.lower()). Any non-SSE response whoseContent-Typeparameters or media subtype happened to containtext/event-stream(such asapplication/json; profile="text/event-stream"ortext/event-stream-custom) was routed intoparse_sse_stream(), silently dropping JSON error payloads and yielding an empty stream.This extracts the media type before the first
;, trims surrounding whitespace, lowercases it, and checks exact equality against'text/event-stream'.Changes
send_http_stream_request()(src/a2a/client/transports/http_helpers.py).test_send_http_stream_request_non_sseandtest_send_http_stream_request_sse_uses_utf8intests/client/transports/test_http_helpers.pyto cover non-SSE headers containingtext/event-stream, as well as uppercase and whitespace-paddedtext/event-streamheaders.Verification
pytest tests/client/transports/test_http_helpers.pyandtests/client/transports/: passed under bothhttpxandhttpx2(20 passed intest_http_helpers.py, 218 passed in transport suite).ruff checkandruff format --check: passed.Follow the
CONTRIBUTINGGuide.Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
Ensure the tests and linter pass
Appropriate docs were updated (if necessary)