feat: Keep only 0.3 compatible endpoints in compat version of AgentCard #847
feat: Keep only 0.3 compatible endpoints in compat version of AgentCard #847
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the generation of backward-compatible AgentCard formats, specifically ensuring that only endpoints compatible with protocol version 0.3 are included. This change is crucial for maintaining proper functionality when interacting with older systems, particularly for the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/client/client_factory.py | 88.89% | 89.35% | 🟢 +0.46% |
| src/a2a/server/apps/rest/fastapi_app.py | 81.25% | 85.42% | 🟢 +4.17% |
| src/a2a/server/apps/rest/rest_adapter.py | 77.22% | 82.28% | 🟢 +5.06% |
| src/a2a/server/request_handlers/response_helpers.py | 95.52% | 95.71% | 🟢 +0.19% |
| src/a2a/compat/v0_3/versions.py (new) | — | 100.00% | — |
| Total | 89.98% | 90.10% | 🟢 +0.11% |
Generated by coverage-comment.yml
There was a problem hiding this comment.
Code Review
This pull request refactors the legacy version checking into a centralized is_legacy_version utility function and uses it to filter for v0.3 compatible interfaces when creating a backward-compatible AgentCard. This correctly prevents non-compatible interfaces from being included. The change is well-supported by new and updated tests that cover various scenarios, including cases where no compatible interfaces exist. The overall implementation is solid. I've added one minor suggestion for a micro-optimization.
2768904 to
50d9676
Compare
50d9676 to
067a675
Compare
When generating backward compatible AgentCard format, keep only 0.3 compatible endpoints.
This affects /.well-known/agent-card.json and AgentCard generation in 0.3 compat layer.
Fixes #742