-
Notifications
You must be signed in to change notification settings - Fork 285
fix: return updated agent_card in JsonRpcTransport.get_card() #552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: return updated agent_card in JsonRpcTransport.get_card() #552
Conversation
The get_card() method was returning the stale 'card' variable instead of the newly fetched 'self.agent_card' when retrieving authenticated extended cards. This caused callers to receive outdated agent metadata. This fix aligns JsonRpcTransport with RestTransport's correct behavior.
Summary of ChangesHello @ShishirRmc, 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 resolves a data consistency issue within the Highlights
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request provides a crucial fix for a bug in JsonRpcTransport.get_card(), ensuring that the method returns the updated agent_card after fetching the authenticated extended version, rather than a stale one. The change is correct and aligns the behavior with RestTransport. I have added one minor suggestion to improve the maintainability of the code and prevent similar issues in the future. Overall, this is a solid contribution.
|
@ShishirRmc Can you adjust the unit tests to check for this new behavior. This is also technically a breaking change, even if you have now corrected the intended behavior. @lkawka @mikeas1 Not sure if this behavior is intended or not, can you verify? |
@holtskinner I didn't find any evidence that this is intended, but I did find a couple of reasons to believe it is not, suggesting a mistake was made.
Since all 3 methods were added on the same commit, this feels like a likely mistake to make. |
Fixes #551
Changes
JsonRpcTransport.get_card()to return the newly fetched authenticated extended card instead of the stale cardDetails
Changed line from
return cardtoreturn self.agent_cardto ensure the method returns the updated card after fetching the authenticated extended version.This aligns the JsonRpcTransport behavior with RestTransport's correct implementation.
Testing