Skip to content

chore: remove unused Bedrock auth lazy loading#18948

Merged
celia-oai merged 1 commit intomainfrom
dev/cc/remove-lazy-load
Apr 22, 2026
Merged

chore: remove unused Bedrock auth lazy loading#18948
celia-oai merged 1 commit intomainfrom
dev/cc/remove-lazy-load

Conversation

@celia-oai
Copy link
Copy Markdown
Collaborator

@celia-oai celia-oai commented Apr 22, 2026

Summary

The Bedrock Mantle SigV4 auth provider currently looks like it can lazily load AwsAuthContext, but the provider is only constructed after resolve_auth_method has already loaded that context. Because with_context always pre-populates the OnceCell, the get_or_try_init fallback is unused in normal operation and makes the provider lifecycle harder to reason about.

This change removes that dead lazy-loading path and makes the actual behavior explicit:

  • BedrockAuthMethod::AwsSdkAuth carries only the resolved AwsAuthContext.
  • BedrockMantleSigV4AuthProvider stores the resolved context directly.
  • request signing uses the stored context without going through OnceCell.

The existing eager AWS auth resolution behavior is unchanged; this is a simplification of the provider state, not a behavior change.

Testing

  • cargo shear
  • cargo test -p codex-model-provider
  • just bazel-lock-check

@celia-oai celia-oai changed the title Remove unused Bedrock auth lazy loading chore: remove unused Bedrock auth lazy loading Apr 22, 2026
@celia-oai celia-oai requested a review from pakrym-oai April 22, 2026 04:36
@celia-oai celia-oai force-pushed the dev/cc/remove-lazy-load branch from dda669e to 12459d4 Compare April 22, 2026 04:39
@celia-oai celia-oai enabled auto-merge (squash) April 22, 2026 04:41
@celia-oai celia-oai merged commit 51fdc35 into main Apr 22, 2026
25 checks passed
@celia-oai celia-oai deleted the dev/cc/remove-lazy-load branch April 22, 2026 05:01
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants