Repository navigation
refactor: use typed AI Gateway actor identity - #30258
Merged
Merged
Conversation
pawbana
force-pushed
the
pawel/issue-29726-actor
branch
from
October 2, 2026 20:38
c8668a7 to
a0f50fb
Compare
dannykopping
approved these changes
Oct 5, 2026
| ID uuid.UUID | ||
| APIKeyID string | ||
| Username string | ||
| // Email is only used when forwarding configured actor headers. It must not |
Collaborator
There was a problem hiding this comment.
No explanation justifying this (GDPR?) nor protections are in place. Maybe we should make this unexported in that case?
Collaborator
Author
There was a problem hiding this comment.
Added here: #29930
My understanding of the linked issue is that this is just how feature should work, not necessarily about privacy / GDRP.
Changes to comment are due to AI being overzealous. Shortened it a bit.
|
|
||
| // APIKeyIDFromContext returns the actor's API-key ID, or ErrMissingAPIKeyID if | ||
| // the actor is absent or its API-key ID is empty. | ||
| func APIKeyIDFromContext(ctx context.Context) (string, error) { |
Collaborator
There was a problem hiding this comment.
Nit: feels incongruous with other FromContext funcs since it returns an error.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds typed AI Gateway actor identity, including the API key ID used by recording.
Recorders now read the authenticated API key ID from each call context instead of capturing request identity at construction time. This allows one recorder to be reused safely across sequential and concurrent requests. Includes context helper coverage and recorder regression tests.
Generated by Coder Agents on behalf of @pawbana.