Repository navigation
Conversation
🧪 Code Coverage (vs
|
| 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
This branch has not been deployed
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.
Refs #1341.
Summary
Add 16 parameterized regression/control cases for JSON-RPC and REST, unary and
SSE responses, and Message and Task payloads. Valid replies retain their known
fields; a string in
Message.parts, directly or underTask.history[0], mustraise a field-specific Protobuf
ParseError.This covers the malformed-known-field boundary discussed in #1341. The tests
use
ClientFactory, the real client/transport methods, HTTPX response handling,and the SDK SSE reader. Only network I/O is replaced with
httpx.MockTransport; parsing is not mocked.This is complementary validation coverage, not the unknown-field compatibility
fix. No production code changes are included. The issue remains open, and its
existing assignees retain implementation ownership.
Verification
Python 3.10.22, locked dependencies, Protobuf 7.36.2, Pydantic 2.13.4:
uv run pytest tests/client/transports/test_response_validation.py -v:16 passed.
./scripts/lint.sh: passed; three existing unused type-ignore warnings.uv run ty check tests/client/transports/test_response_validation.py: passed.uv run pytest: 2295 passed, 183 skipped, 3 xfailed, 1 xpassed. A freshpre-publication run produced the same test outcomes.
uv run pytest --cov=a2a --cov-report=term --cov-fail-under=88:passed, 93.14% coverage.
The first full run had four setup errors because the cross-version fixture's
isolated 0.3.24 server exceeded its three-second startup deadline. After
prewarming that dependency environment, the unchanged cross-version tests
passed 4/4, then the full suite passed without exclusions. No timeout or fixture
changes were made. Database DSNs were unset; other Python versions were not run.
Existing warnings and expected-status tests associated with #869 are outside
this patch's scope.
AI assistance: Codex was used to draft the tests and run local verification.