Repository navigation
Capture immutable credential scopes for resource operations - #124
Closed
Stephen Belanger (Qard) wants to merge 1 commit into
Closed
Stephen Belanger (Qard) wants to merge 1 commit into
Stephen Belanger (Qard) wants to merge 1 commit into
Conversation
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.
A resource's bearer token did not fully determine its request scope. The trace queue chose endpoint routes and missing organization headers from shared login state at flush time, while dataset operations used configured routes even after login selected an organization-specific data endpoint. Project lookup caching also ignored credentials, and capability caching was shared across all routes.
Capture an immutable credential scope in each span, experiment, dataset, and pagination handle. Logged-in builders capture the selected organization and routes; explicit builders capture their credentials and configured routes independently of shared login. Resource adapters and queued commands carry that same scope through registration, lookup, preparation, merging, and upload. Experiment API calls now preserve the explicit organization header too.
Project and capability caches and upload groups use the full scope: token, organization ID/name, control URL, and data URL. Successful lookup caches are bounded to 1,024 entries each; eviction repeats a lookup rather than retaining unlimited tenant credentials. Debug formatting omits scope credentials and routes.
Stacked on #123. Public generic handles and remaining finished-span behavior are addressed in subsequent layers; this PR changes request identity and routing without adding a second resource API. Planning notes remain local.
Validation:
git diff --checkpassed.