Repository navigation
Conversation
A replica that finished an interrupted turn keeps the task registered. Tapping that entry returned the old snapshot and never saw the turn running elsewhere. The local tap now stays for a turn this replica is executing.
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/agent_execution/active_task.py | 95.02% | 94.83% | 🔴 -0.19% |
| src/a2a/server/request_handlers/default_request_handler_v2.py | 87.46% | 90.09% | 🟢 +2.62% |
| Total | 93.10% | 93.18% | 🟢 +0.08% |
Generated by coverage-comment.yml
1 task done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1323.
A replica that finished an interrupted turn keeps the task in its registry.
SubscribeToTasktreated that entry as the live producer, yielded the cached snapshot, and closed. The turn running on another replica was on the shared stream.The local tap now stays only while this replica holds the request lock. A parked entry follows the snapshot already read from the store and tails the shared stream. A turn that is executing here is still tapped locally. Single-process mode, where there is no shared stream, is unchanged.
The caller is resubscribing to their own task. The store already has the current snapshot. The parked registry entry was the stale one.
Restoring
if local is not Nonemakestest_paused_replica_resubscribe_follows_the_shared_streamtime out on the parked tap. The in-flight test still receives the local task and leaves the shared stream untapped.Test plan
pytest tests/server/request_handlers/test_default_request_handler_v2.py -k 'paused_replica or in_flight_replica'pytest tests/server/request_handlers/test_default_request_handler_v2.py -k subscribe_to_task