fix(codex): keep local proxy config stable during failover#3776
fix(codex): keep local proxy config stable during failover#3776MonitorAllen wants to merge 4 commits into
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92b24246d5
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0fbaba6ec5
ℹ️ 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".
|
To use Codex here, create a Codex account and connect to github. |
Summary
~/.codex/config.tomlor rebuildingproxy_live_backupfrom provider snapshots during Codex failover.mcp_servers,plugins,projects,marketplaces,memories,desktop, andfeatures.Background
When Codex local proxy and auto failover are enabled, Codex should remain pointed at the CC Switch local endpoint while CC Switch changes the upstream provider internally.
Before this change, the failover path reused the normal provider hot-switch flow. For Codex, that could write the selected provider snapshot back to the live config. If that provider snapshot was stale, user-owned Codex settings such as MCP servers, plugins, project trust entries, desktop settings, and feature flags could be dropped.
This PR separates the Codex failover path from normal live config switching. Provider-owned routing still updates internally, while the Codex client live config stays stable when local proxy routing is already active.
Related
Related discussions: #3700, #3756, and the overlapping normal provider-write work in #3697.
This PR focuses specifically on Codex local proxy + auto failover behavior and startup takeover backup repair.
Verification
CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse ASDF_RUST_VERSION=stable cargo test services::proxy::tests:: -- --test-threads=1ASDF_RUST_VERSION=stable cargo fmt --checkgit diff --check