Repository navigation
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/routes/common.py | 92.59% | 92.73% | 🟢 +0.13% |
| src/a2a/utils/version_validator.py | 94.29% | 94.67% | 🟢 +0.38% |
| Total | 93.10% | 93.10% | ⚪️ 0.00% |
Generated by coverage-comment.yml
014b1f0 to
7a9ef79
Compare
7a9ef79 to
595d979
Compare
|
Hi @rohityan, just checking in on #1204 when you have a moment. I have rebased this PR onto the latest main and resolved the test import conflict, preserving the new SSE shutdown tests. The scope is unchanged: Major.Minor validation and header, query parameter, then default resolution for REST and JSON-RPC. Local lint and type checks pass, along with 2,288 tests and 93% total coverage. Please let me know if you would like any changes to the approach or scope. |
|
Thanks for this. It fixes what #1204 describes: Major.Minor matching and the query fallback. We ran our server's version-negotiation tests against this branch, applied on current I'm happy to send either one as a follow-up after this merges, if that's useful. |
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 🦕