-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(agents): tolerate empty A2A message parts in RemoteA2aAgent #3777
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(agents): tolerate empty A2A message parts in RemoteA2aAgent #3777
Conversation
|
Response from ADK Triaging Agent Hello @saurabhhhcodes, thank you for creating this PR! To help reviewers understand how you've tested these changes, could you please add a "Testing Plan" section to your PR description? You can find more details in our contribution guidelines. Thank you! |
9cd4693 to
a43f9f6
Compare
|
Summary: Fix IndexError in What changed:
Tests:
Note: I attempted to request reviewers but got a permissions error when requesting reviewers on the upstream repo. If you want reviewers added, tell me their GitHub handles and whether to: 1) add them as requested reviewers (may fail if repo permissions prevent it), or 2) mention them in a follow-up PR comment (I can do that now). |
|
Is this most recent comment some bug with people vibe coding using copilot in github or something? This is the second time in a week I've seen thinking messages or response to a person show up as issues in ADK (not the only issue with what the ai did in this PR, which is also "lying" about what it has done) |
|
Hi @saurabhhhcodes , Thank you for your contribution through this pull request! |
…ard against empty when handling initial TASK responses to avoid IndexError. Added unit test covering empty-parts TASK_REQUIRED scenario.
8c117c8 to
2294f1f
Compare
|
I have rebased the branch on the latest main, applied the fix for empty parts in RemoteA2aAgent, and added the requested unit test. Please review. |
Guard against empty event.content.parts when handling initial TASK_REQUIRED responses. Added unit test covering the empty-parts scenario.
2294f1f to
009a663
Compare
Fixes an IndexError when handling initial A2A TASK_REQUIRED responses that contain no message parts. The handler now checks for empty parts before accessing them and marks all present parts as thought for submitted tasks. Added a unit test covering the empty-parts scenario.\n\nTesting plan:\n- Unit test added: tests/unittests/agents/test_remote_a2a_agent.py (new case in TestRemoteA2aAgentMessageHandling).\n- Run tests locally with dev environment active:
PYTHONPATH=src pytest tests/unittests/agents/test_remote_a2a_agent.py -qor run the single new test as needed.\n- CI will run full test matrix; this change is small and focused.Testing
tests/unittests/agents/test_remote_a2a_agent.pycovering empty-parts TASK_REQUIRED.pytest tests/unittests/agents/test_remote_a2a_agent.py— 70 passed, 81 warnings.event.content.partsinRemoteA2aAgent._handle_a2a_responseto avoid IndexError.Testing
tests/unittests/agents/test_remote_a2a_agent.pycovering empty-parts TASK_REQUIRED.pytest tests/unittests/agents/test_remote_a2a_agent.py— 70 passed, 81 warnings.event.content.partsinRemoteA2aAgent._handle_a2a_responseto avoid IndexError.