fix: set Kind discriminator in ToLegacyTask A2A conversion#2038
Merged
Conversation
Signed-off-by: dvaz-external <dvaz.external@epo.org>
Contributor
Author
|
Build error doesn't seem related with the change: |
Contributor
Author
Using version 0.9.8 of the controller:
Questions were answered but there is no further reaction in the UI, checking the Agent logs I see the error logs describe in the issue #2037 Using a locally built version with the changes suggested in this PR
|
EItanya
approved these changes
Jun 17, 2026
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
Fix Pydantic validation error when resuming tasks after
ask_userHITL interrupt.Problem
When converting A2A v1 tasks back to legacy v0 format in
ToLegacyTask(), theKinddiscriminator field was not being set. This caused tasks serialized through the Go controller to be rejected by Python's Pydantic validation with:Solution
Add
Kind: trpc.KindTaskto thetrpc.Taskstruct literal inToLegacyTask(), matching the pattern already used bytoLegacyMessage().Changes
Kindfield in legacy task conversionassertBackwardTaskFixture()Testing
Fixes #2037