fix(golang-adk): resolve user identity from A2A call context - #2444
Open
buravc wants to merge 2 commits into
Open
fix(golang-adk): resolve user identity from A2A call context#2444buravc wants to merge 2 commits into
buravc wants to merge 2 commits into
Conversation
Signed-off-by: buravc <avcii.brk@gmail.com>
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.
AI Disclosure: This PR was created with an AI agent under my supervision.
Fixes #2443
This PR fixes task/chat history disappearing after 0.10 upgrade.
Tasks were saved and read under admin@kagent.dev instead of the real
user. A2A splits task execution and task persistence into separate
goroutines off a shared context. auth.WithUserID only rebinds a local
copy, so the persistence goroutine never saw it, sent an empty
x-user-id, and the controller's UnsecureAuthenticator fell back to
admin@kagent.dev.
Introduced in #2354 (a2a-go v0.3.x -> v2 migration), which switched
task execution to the SDK's producer/consumer goroutine model.
taskstore now reads the caller from a2asrv.CallContext, which is
attached before the fork so both goroutines see it. Falls back to the
old behavior otherwise.
Added a test with conflicting CallContext/context values, confirmed it
fails without the fix.