Skip to content

fix(server): validate A2A-Version minor and query fallback - #1225

Open
LeonMAG wants to merge 1 commit into
a2aproject:mainfrom
LeonMAG:fix/a2a-version-validation
Open

fix(server): validate A2A-Version minor and query fallback#1225
LeonMAG wants to merge 1 commit into
a2aproject:mainfrom
LeonMAG:fix/a2a-version-validation

Conversation

@LeonMAG

@LeonMAG LeonMAG commented Sep 1, 2026

Copy link
Copy Markdown

Description

validate_version now requires matching A2A major and minor versions while continuing to ignore patch versions. HTTP request contexts also preserve query parameters, so A2A-Version is resolved in the order required by #1204: header, query parameter, then the existing 0.3 default.

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; ty reports 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 CONTRIBUTING Guide.

  • 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 🦕

@LeonMAG
LeonMAG requested a review from a team as a code owner September 1, 2026 14:25
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: A2A-Version validation ignores minor versions and the query parameter

1 participant