Skip to content

fix(client): skip incompatible transport bindings when selecting an interface - #1510

Open
GoldArowana wants to merge 1 commit into
a2aproject:mainfrom
GoldArowana:fix-client-fallback-incompatible-binding-20ad34de
Open

GoldArowana wants to merge 1 commit into
a2aproject:mainfrom
GoldArowana:fix-client-fallback-incompatible-binding-20ad34de

Conversation

@GoldArowana

Copy link
Copy Markdown

Description

With server preference enabled by default, ClientFactory.create stops at the first configured transport binding even when the card advertises no usable protocol version for it. A card that lists a 0.2 JSON-RPC interface before a 1.0 HTTP+JSON interface therefore raises ValueError: no compatible transports found, despite the client supporting the second interface.

Continue through the advertised transport order when the existing version selector finds no match. The existing version ranking within a binding and the error when all interfaces are incompatible remain unchanged. See A2A 1.0 §8.3.2.

Testing

  • The new factory regression fails on 06cd52892e45 and passes with this change.
  • Both the precommit sequence and the rerun on 622a12d9d1d8 passed. uv run pytest and uv run pytest --cov=src --cov-report=term-missing each passed 2,676 tests, with 215 project-configured skips, four expected failures and one unexpected pass. The coverage run reported 94%. Local PostgreSQL and MySQL integration services were unavailable, so their tests retained their normal skips.
  • On the committed head, 36 related client tests and four local factory-to-REST controls passed. The controls exercise the recovered GetTask path, client preference, compatible first interface, and no match.

Codex assisted with implementation and test execution.

  • Followed the contribution guide.
  • Used a Conventional Commits title.
  • Ran the normal test and lint commands.
  • Verified the existing API documentation still describes the intended behavior.

@GoldArowana
GoldArowana requested a review from a team as a code owner November 20, 2026 22:04
@github-actions

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/client/client_factory.py 89.94% 90.23% 🟢 +0.29%
src/a2a/server/cluster/database_event_stream.py 97.27% 93.64% 🔴 -3.64%
Total 94.14% 94.11% 🔴 -0.03%

Generated by coverage-comment.yml

This branch has not been deployed

No deployments
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.

1 participant