fix(server): validate A2A-Version minor and query fallback - #1225
Open
LeonMAG wants to merge 1 commit into
Open
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/routes/common.py | 92.31% | 92.50% | 🟢 +0.19% |
| src/a2a/utils/version_validator.py | 92.86% | 93.33% | 🟢 +0.48% |
| Total | 92.97% | 92.97% | ⚪️ 0.00% |
Generated by coverage-comment.yml
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
validate_versionnow requires matching A2A major and minor versions while continuing to ignore patch versions. HTTP request contexts also preserve query parameters, soA2A-Versionis resolved in the order required by #1204: header, query parameter, then the existing0.3default.The shared context builder keeps REST and JSON-RPC aligned. gRPC and the separate work in #1167 are intentionally out of scope.
Testing
uv run pytest tests/utils/test_version_validation.py tests/server/routes/test_common.py tests/integration/test_version_header.py— 91 passed../scripts/lint.sh— passed;tyreports three pre-existing warnings outside this diff.uv run pytest— 1996 passed, 90 skipped, 3 xfailed, 1 xpassed.uv run pytest --cov=src --cov-report=term-missing— 1996 passed; total coverage 93%.Follow the
CONTRIBUTINGGuide.Make the Pull Request title follow the Conventional Commits specification.
Ensure the tests and linter pass.
Appropriate docs were updated (not needed: this fixes existing server behavior and its tests).
Fixes #1204 🦕