Skip to content

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

Merged
Iwaniukooo11 merged 4 commits into
a2aproject:mainfrom
ConnorMoss02:fix/v03-rest-extended-card
Nov 9, 2026
Merged

Iwaniukooo11 merged 4 commits into
a2aproject:mainfrom
ConnorMoss02:fix/v03-rest-extended-card

Conversation

@ConnorMoss02

@ConnorMoss02 ConnorMoss02 commented Nov 3, 2026 •

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 parse_agent_card, the same path the card resolver uses, and log missing required fields with warn_on_missing_required_fields (#1279). A card missing required fields still parses, as before.

Tests

test_compat_rest_transport_get_extended_agent_card_keeps_security fails on main. It uses the payload REST03Handler returns. The existing minimal-card test is unchanged. 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/server/cluster/database_event_stream.py 92.73% 97.27% 🟢 +4.55%
Total 93.48% 93.53% 🟢 +0.05%

Generated by coverage-comment.yml

@Iwaniukooo11 Iwaniukooo11 self-assigned this Nov 4, 2026
Comment thread src/a2a/compat/v0_3/rest_transport.py Resolved
ConnorMoss02 and others added 2 commits November 4, 2026 09:50
Use parse_agent_card and warn on missing required fields instead of
strict validation, so a card missing required fields still parses, as
before. Revert the existing test payload to the minimal card.
@Iwaniukooo11

Copy link
Copy Markdown
Member

All good,

@ConnorMoss02 - Please update the PR description as the approach has changed

@Iwaniukooo11 Iwaniukooo11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Iwaniukooo11
Iwaniukooo11 merged commit 076e0ec into a2aproject:main Nov 9, 2026
18 checks passed
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

2 participants