refactor: make auth loading async#19762
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e251d8b7d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let outgoing = Arc::new(OutgoingMessageSender::new(outgoing_tx)); | ||
| let auth_manager = | ||
| AuthManager::shared_from_config(config.as_ref(), /*enable_codex_api_key_env*/ false); | ||
| AuthManager::shared_from_config(config.as_ref(), /*enable_codex_api_key_env*/ false).await; |
There was a problem hiding this comment.
Make build_test_processor async before awaiting auth load
build_test_processor is still a synchronous fn, but it now calls AuthManager::shared_from_config(...).await. This triggers Rust error E0728 (await is only allowed in async functions/blocks), so the app-server test target fails to compile when tests are built.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
e251d8b to
a20884a
Compare
Summary
Auth loading used to expose synchronous construction helpers in several places even though some auth sources now need async work. This PR makes the auth-loading surface async and updates the callers to await it.
This is intentionally only plumbing. It does not change how AgentIdentity tokens are decoded, how task runtime ids are allocated, or how JWT signatures are verified.
Stack
Important call sites
codex-loginauth loadingCodexAuthandAuthManagerconstruction paths now await auth loading.Testing
Tests: targeted Rust auth test compilation, formatter, scoped Clippy fix, and Bazel lock check.