fix: do not treat TASK_STATE_UNSPECIFIED as a terminal event - #1217
Open
anxkhn wants to merge 1 commit into
Open
fix: do not treat TASK_STATE_UNSPECIFIED as a terminal event#1217anxkhn wants to merge 1 commit into
anxkhn wants to merge 1 commit into
Conversation
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
🧪 Code Coverage (vs
|
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.
Description
Fixes #1214
Summary
Legacy
EventConsumer.is_final_eventincludedTASK_STATE_UNSPECIFIEDin the stop set. That is the proto default (value 0), not a finished state.Spec 4.1.3 treats unspecified as unknown. Terminal is COMPLETED, FAILED, CANCELED, REJECTED. V2
TERMINAL_TASK_STATESalready omits unspecified.INPUT_REQUIREDis left alone because consume_all still pauses there on the legacy path.If an agent enqueues a Task without setting status, or a status update that omits state, the queue closed and later WORKING/COMPLETED events never reached message/send, stream, cancel, or subscribe.
UNSPECIFIED is removed from the terminal set so a default-state Task no longer stops the loop.
Testing
Added
test_consume_all_does_not_stop_on_unspecified_state.16 passed, 2 xfailed (existing #869).