Skip to content

fix(server): preserve required empty agent card skills - #1265

Closed
Ha1baraA11 wants to merge 1 commit into
a2aproject:mainfrom
Ha1baraA11:codex/fix-required-agent-card-skills
Closed

Ha1baraA11 wants to merge 1 commit into
a2aproject:mainfrom
Ha1baraA11:codex/fix-required-agent-card-skills

Conversation

@Ha1baraA11

Copy link
Copy Markdown

Description

Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
    • Important Prefixes for release-please:
      • fix: which represents bug fixes, and correlates to a SemVer patch.
      • feat: represents new features, and correlates to a SemVer minor.
      • feat!:, or fix!:, refactor!:, etc., which are breaking changes (indicated by the !) and will result in a SemVer major.
  • Ensure the tests and linter pass (Run bash scripts/format.sh from the repository root to format)
  • Appropriate docs were updated (not needed for this serialization fix)

Summary

  • Preserve the required skills field as an empty list when serializing an AgentCard with no skills.
  • Keep protobuf's omission behavior for other optional empty repeated fields.

Test plan

  • ./scripts/lint.sh (ruff check, ruff format, ty check)
  • uv run pytest -k 'not cross_version' (1987 passed, 92 skipped, 3 xfailed, 1 xpassed)
  • uv run pytest -k 'not cross_version' --cov=src --cov-report=term-missing (93% coverage)
  • Manual route and response-helper regression tests (21 passed)

Fixes #1261 🦕

@Ha1baraA11
Ha1baraA11 requested a review from a team as a code owner September 21, 2026 21:06
@github-actions

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/request_handlers/response_helpers.py 95.71% 95.77% 🟢 +0.06%
Total 93.06% 93.06% ⚪️ 0.00%

Generated by coverage-comment.yml

@mykytanetipa

Copy link
Copy Markdown
Collaborator

The AgentCard usecase reported in the #1261 is not spec compliant, closing this PR.

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.

agent_card_to_dict omits the REQUIRED empty skills field

2 participants