Repository navigation
fix(server): mark a task FAILED when its execution fails - #459
Merged
muscariello merged 1 commit intoNov 3, 2026
Merged
muscariello merged 1 commit into
muscariello merged 1 commit into
Conversation
An executor error, an event the server cannot apply, or a push failure with fail_on_error ended the execution without a terminal state, so the stored task stayed SUBMITTED or WORKING for good: GetTask and ListTasks kept reporting it in progress and a returnImmediately caller polling it never saw it end. The failed execution now saves the task as FAILED, with the sanitized error as its status message, before the error reaches the live subscribers as before. Signed-off-by: gulldan <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
lgecse
approved these changes
Nov 3, 2026
Merged
This was referenced Nov 3, 2026
Closed
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 #431. Replaces #432.
Cause: an executor error, an event the server cannot apply, or a push failure with
fail_on_errorendeddrive_executionwithout a terminal state. The stored task stayedSUBMITTEDorWORKINGfor good, soGetTaskandListTaskskept reporting it in progress and areturnImmediatelycaller polling it (§3.2.2) never saw it end.Fix: the three error paths record the error and leave the loop.
fail_taskthen saves the task asTASK_STATE_FAILEDwith the sanitized error as its status message, and the error reaches live subscribers as before. A task that is already terminal (canceled meanwhile) is left alone.Tests:
test_execution_error_leaves_the_task_failed,test_unappliable_event_leaves_the_task_failedandtest_failed_push_leaves_the_task_failedfail with the fix reverted.test_canceled_task_is_not_marked_failedguards the canceled case. AScriptedExecutorhelper is reused by the later handler fixes.Unproven: the caller still gets the typed error, as with the Python SDK; the Go SDK returns the failed Task instead. The A2A 1.1 line (#388/#392), which #432 says writes
FAILEDonly after a panic, was not checked.