mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
Reuse config server discovery when loading managed policy (#63473)
## Why CLI login and interactive TUI startup could look up the same config server's OAuth metadata again when loading managed policy, even after resolving it for sign-in. ## What changed - Carry the resolved config server settings in memory from sign-in to policy loading and through TUI startup and worktree setup. Reuse them only when the configured server, outbound proxy policy, and system proxy fallback setting match. - Rediscover anonymous servers after onboarding so the TUI can pick up a newly enabled OAuth requirement. - Use discovered OAuth settings to classify app-server startup errors as config server errors when applicable. ## Testing Add a regression test that blocks discovery requests and checks reuse for matching OAuth and anonymous resolutions, as well as cache misses when the server or either proxy setting changes. GitOrigin-RevId: 28b5c8ffdb80db09dd8bbae3c1e187189ea393bf
This commit is contained in:
@@ -446,6 +446,7 @@ pub async fn run_main(cli: Cli, arg0_paths: Arg0DispatchPaths) -> anyhow::Result
|
||||
.bind_bootstrap_auth(bootstrap_auth_config(&codex_home, &gate_bootstrap)?),
|
||||
gate_bootstrap.config_layer_stack.requirements_toml(),
|
||||
/*enable_codex_api_key_env*/ false,
|
||||
/*resolution*/ None,
|
||||
)
|
||||
.await?;
|
||||
let gate_config = ConfigBuilder::default()
|
||||
@@ -546,6 +547,7 @@ pub async fn run_main(cli: Cli, arg0_paths: Arg0DispatchPaths) -> anyhow::Result
|
||||
bootstrap_auth_config,
|
||||
bootstrap_config.config_layer_stack.requirements_toml(),
|
||||
/*enable_codex_api_key_env*/ false,
|
||||
/*resolution*/ None,
|
||||
)
|
||||
.await?;
|
||||
if let Some(worktree) = managed_worktree.as_ref() {
|
||||
|
||||
Reference in New Issue
Block a user