Skip to content

fix(compat): parse the v0.3 REST extended agent card as JSON - #1420

Open
ConnorMoss02 wants to merge 1 commit into
a2aproject:mainfrom
ConnorMoss02:fix/v03-rest-extended-card
Open

ConnorMoss02 wants to merge 1 commit into
a2aproject:mainfrom
ConnorMoss02:fix/v03-rest-extended-card

Conversation

@ConnorMoss02

Copy link
Copy Markdown
Contributor

Problem

The compat REST client parsed the extended agent card as proto JSON, so security schemes and requirements were lost.

Fix

Parse it with types_v03.AgentCard.model_validate, as the JSON-RPC client does.

Tests

test_compat_rest_transport_get_extended_agent_card_keeps_security fails on main. It uses the payload REST03Handler returns. The existing extended card test payload is now a valid v0.3 card, since the strict model rejects one with only name and capabilities. 2520 passed.

Fixes #1418

@ConnorMoss02
ConnorMoss02 requested a review from a team as a code owner November 3, 2026 16:27
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/compat/v0_3/rest_transport.py 95.63% 95.60% 🔴 -0.03%
src/a2a/server/cluster/database_event_stream.py 93.64% 97.27% 🟢 +3.64%
Total 93.42% 93.46% 🟢 +0.04%

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.

Compat REST client drops security from the v0.3 extended agent card

1 participant