Skip to content

fix: cherry-pick fixes for 0.3#281

Merged
yarolegovich merged 2 commits intorelease/spec-v0from
yarolegovich/cherry-pick-fixes
Mar 17, 2026
Merged

fix: cherry-pick fixes for 0.3#281
yarolegovich merged 2 commits intorelease/spec-v0from
yarolegovich/cherry-pick-fixes

Conversation

@yarolegovich
Copy link
Copy Markdown
Member

re #279

@yarolegovich yarolegovich changed the title cherry-pick fixes fix: cherry-pick fixes for 0.3 Mar 16, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 cherry-picks several targeted fixes to enhance the stability and correctness of the A2A service. The changes address specific issues in JSONRPC response handling, streaming request concurrency, task execution flow, task cancellation error management, and task artifact metadata initialization. These adjustments collectively contribute to a more reliable and efficient system.

Highlights

  • JSONRPC Response Handling: Refactored JSONRPC response encoding to always send a response, removing a conditional check for a non-nil result, and buffered the panic channel in streaming requests to prevent potential deadlocks.
  • Task Execution Logic: Optimized the task execution flow by reordering work queue operations and simplifying error handling, ensuring a more robust process.
  • Task Cancellation Error Handling: Improved task cancellation by adding a break condition to the event loop when an error occurs, preventing unnecessary processing.
  • Task Artifact Metadata: Corrected the initialization of the task artifact metadata map to use the correct length for capacity, preventing potential inefficiencies.
Changelog
  • a2asrv/jsonrpc.go
    • Removed the conditional check for result != nil before encoding the JSONRPC response.
    • Initialized panicChan with a buffer capacity of 1 in handleStreamingRequest.
  • internal/taskexec/distributed_manager.go
    • Removed an unused import of the log package.
    • Reordered the workQueue.Write and queueManager.GetOrCreate calls in the Execute method, and removed the conditional queue.Close() call on workQueue.Write error.
    • Added a break statement to the Cancel method's event loop when an error occurs.
  • internal/taskexec/distributed_manager_test.go
    • Updated a test case description and removed the queueClosed expectation for work queue write error scenarios.
  • internal/taskupdate/manager.go
    • Corrected the initialization of the Metadata map to use len(artifact.Metadata) instead of len(artifact.Description) for capacity.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 appears to be a cherry-pick of several bug fixes. The changes include ensuring a JSON-RPC response is always sent for non-notification requests and making a channel buffered to prevent potential deadlocks in a2asrv/jsonrpc.go. In internal/taskexec/distributed_manager.go, operations are reordered to prevent resource leaks on failure, and loop termination logic is clarified. A bug related to incorrect map capacity allocation is fixed in internal/taskupdate/manager.go. The corresponding test in internal/taskexec/distributed_manager_test.go has been updated to reflect the logic changes. All changes are valid bug fixes and improve the robustness and correctness of the code. I have not found any new issues in this pull request.

@yarolegovich yarolegovich merged commit 6449d35 into release/spec-v0 Mar 17, 2026
4 checks passed
@yarolegovich yarolegovich deleted the yarolegovich/cherry-pick-fixes branch March 17, 2026 10:14
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.

2 participants