core-agent-ide/codex-rs/mcp-server/src
Michael Bolin a8797019a1
chore: cleanup Config instantiation codepaths (#8226)
This PR does various types of cleanup before I can proceed with more
ambitious changes to config loading.

First, I noticed duplicated code across these two methods:


774bd9e432/codex-rs/core/src/config/mod.rs (L314-L324)


774bd9e432/codex-rs/core/src/config/mod.rs (L334-L344)

This has now been consolidated in
`load_config_as_toml_with_cli_overrides()`.

Further, I noticed that `Config::load_with_cli_overrides()` took two
similar arguments:


774bd9e432/codex-rs/core/src/config/mod.rs (L308-L311)

The difference between `cli_overrides` and `overrides` was not
immediately obvious to me. At first glance, it appears that one should
be able to be expressed in terms of the other, but it turns out that
some fields of `ConfigOverrides` (such as `cwd` and
`codex_linux_sandbox_exe`) are, by design, not configurable via a
`.toml` file or a command-line `--config` flag.

That said, I discovered that many callers of
`Config::load_with_cli_overrides()` were passing
`ConfigOverrides::default()` for `overrides`, so I created two separate
methods:

- `Config::load_with_cli_overrides(cli_overrides: Vec<(String,
TomlValue)>)`
- `Config::load_with_cli_overrides_and_harness_overrides(cli_overrides:
Vec<(String, TomlValue)>, harness_overrides: ConfigOverrides)`

The latter has a long name, as it is _not_ what should be used in the
common case, so the extra typing is designed to draw attention to this
fact. I tried to update the existing callsites to use the shorter name,
where possible.

Further, in the cases where `ConfigOverrides` is used, usually only a
limited subset of fields are actually set, so I updated the declarations
to leverage `..Default::default()` where possible.
2025-12-17 18:01:17 -08:00
..
tool_handlers remove mcp-server/src/mcp_protocol.rs and the code that depends on it (#2360) 2025-08-18 00:29:18 -07:00
codex_tool_config.rs chore: cleanup Config instantiation codepaths (#8226) 2025-12-17 18:01:17 -08:00
codex_tool_runner.rs Add public skills + improve repo skill discovery and error UX (#8098) 2025-12-17 01:35:49 -08:00
error_code.rs fix: update OutgoingMessageSender::send_response() to take Serialize (#2263) 2025-08-13 14:29:13 -07:00
exec_approval.rs Removed experimental "command risk assessment" feature (#7799) 2025-12-10 09:48:11 -08:00
lib.rs chore: cleanup Config instantiation codepaths (#8226) 2025-12-17 18:01:17 -08:00
main.rs Added new auth-related methods and events to mcp server (#2496) 2025-08-20 20:36:34 -07:00
message_processor.rs [Auth] Choose which auth storage to use based on config (#5792) 2025-10-27 19:41:49 -07:00
outgoing_message.rs Reimplement skills loading using SkillsManager + skills/list op. (#7914) 2025-12-14 09:58:17 -08:00
patch_approval.rs chore: introduce ConversationManager as a clearinghouse for all conversations (#2240) 2025-08-13 13:38:18 -07:00