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 addresses a critical issue in 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. Footnotes
|
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/tasks/inmemory_task_store.py | 96.77% | 97.14% | 🟢 +0.37% |
| src/a2a/server/tasks/copying_task_store.py (new) | — | 100.00% | — |
| Total | 91.39% | 91.43% | 🟢 +0.04% |
Generated by coverage-comment.yml
There was a problem hiding this comment.
Code Review
This pull request introduces a significant improvement to the InMemoryTaskStore by making it behave consistently with database-backed task stores. By default, it now returns copies of Task objects instead of direct references, which prevents subtle bugs related to shared mutable state. This is achieved cleanly by introducing a CopyingTaskStoreAdapter and refactoring InMemoryTaskStore to use it. The changes are well-structured and accompanied by a comprehensive set of unit and integration tests that validate the new behavior. My review includes a couple of minor suggestions to improve code clarity and remove unused code. Overall, this is an excellent change.
a57e9c4 to
e70fd58
Compare
e70fd58 to
0d1cb60
Compare
0d1cb60 to
4ae40ae
Compare
Sharing the Task object instance in InMemoryTaskStore leads to unexpected behaviour (from differences of in-place update Task in AgentExecutor to non-trivial concurrency reporting issues on task state reporting).
Fixes #869