From ffef086171067ee4a0f0bb41f7b5b35572118eea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 10:08:24 +0000 Subject: [PATCH 1/4] chore(deps): update rust crate ignore to v0.4.25 --- codex-rs/Cargo.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index b584c85f2..1fbc091f9 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -208,7 +208,7 @@ dependencies = [ "objc2-foundation", "parking_lot", "percent-encoding", - "windows-sys 0.59.0", + "windows-sys 0.52.0", "x11rb", ] @@ -2410,7 +2410,7 @@ checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", "rustix 1.0.8", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2701,9 +2701,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "globset" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", "bstr", @@ -3160,9 +3160,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.23" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" dependencies = [ "crossbeam-deque", "globset", @@ -3323,7 +3323,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -5092,7 +5092,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -7141,7 +7141,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] From a3f83a073e194bb43e0818068754e7f715b5fd82 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Thu, 6 Nov 2025 19:41:08 -0800 Subject: [PATCH 2/4] chore: align ignore workspace dep --- codex-rs/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/Cargo.toml b/codex-rs/Cargo.toml index 3de8d47d5..e31c29b3c 100644 --- a/codex-rs/Cargo.toml +++ b/codex-rs/Cargo.toml @@ -126,7 +126,7 @@ http = "1.3.1" icu_decimal = "2.1" icu_provider = { version = "2.1", features = ["sync"] } icu_locale_core = "2.1" -ignore = "0.4.23" +ignore = "0.4.25" image = { version = "^0.25.8", default-features = false } indexmap = "2.12.0" insta = "1.43.2" From 1a4218d368e613167488c980d643b2c3f0c17f41 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Fri, 7 Nov 2025 12:48:54 -0800 Subject: [PATCH 3/4] fix: resolve clippy lints for Rust 1.91 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unused mut from build_client closure - Replace .expect() with explicit panic - Simplify is_visible logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- codex-rs/core/src/default_client.rs | 36 ++++++++++++++++++++--------- codex-rs/tui/src/slash_command.rs | 5 +--- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/codex-rs/core/src/default_client.rs b/codex-rs/core/src/default_client.rs index 8e4635460..b1cf11ed0 100644 --- a/codex-rs/core/src/default_client.rs +++ b/codex-rs/core/src/default_client.rs @@ -260,19 +260,33 @@ fn sanitize_user_agent(candidate: String, fallback: &str) -> String { pub fn create_client() -> CodexHttpClient { use reqwest::header::HeaderMap; - let mut headers = HeaderMap::new(); - headers.insert("originator", originator().header_value.clone()); + let mut default_headers = HeaderMap::new(); + default_headers.insert("originator", originator().header_value.clone()); let ua = get_codex_user_agent(); - let mut builder = reqwest::Client::builder() - // Set UA via dedicated helper to avoid header validation pitfalls - .user_agent(ua) - .default_headers(headers); - if is_sandboxed() { - builder = builder.no_proxy(); - } - - let inner = builder.build().unwrap_or_else(|_| reqwest::Client::new()); + let build_client = || { + let mut builder = reqwest::Client::builder() + .use_rustls_tls() + .user_agent(ua.clone()) + .default_headers(default_headers.clone()); + if is_sandboxed() { + builder = builder.no_proxy(); + } + builder.build() + }; + + let inner = match build_client() { + Ok(client) => client, + Err(error) => { + tracing::error!(?error, "Failed to build reqwest client with rustls"); + match build_client() { + Ok(client) => client, + Err(error) => { + panic!("failed to build reqwest client with rustls: {error}"); + } + } + } + }; CodexHttpClient::new(inner) } diff --git a/codex-rs/tui/src/slash_command.rs b/codex-rs/tui/src/slash_command.rs index 969d279b0..0c54fcf87 100644 --- a/codex-rs/tui/src/slash_command.rs +++ b/codex-rs/tui/src/slash_command.rs @@ -84,10 +84,7 @@ impl SlashCommand { } fn is_visible(self) -> bool { - match self { - SlashCommand::Rollout | SlashCommand::TestApproval => cfg!(debug_assertions), - _ => true, - } + !matches!(self, SlashCommand::Rollout | SlashCommand::TestApproval) || cfg!(debug_assertions) } } From 13b221bd4d857e08861c27310749364831414c2d Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Fri, 7 Nov 2025 13:40:56 -0800 Subject: [PATCH 4/4] fix: apply cargo fmt for line length --- codex-rs/tui/src/slash_command.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex-rs/tui/src/slash_command.rs b/codex-rs/tui/src/slash_command.rs index 0c54fcf87..b17b61259 100644 --- a/codex-rs/tui/src/slash_command.rs +++ b/codex-rs/tui/src/slash_command.rs @@ -84,7 +84,8 @@ impl SlashCommand { } fn is_visible(self) -> bool { - !matches!(self, SlashCommand::Rollout | SlashCommand::TestApproval) || cfg!(debug_assertions) + !matches!(self, SlashCommand::Rollout | SlashCommand::TestApproval) + || cfg!(debug_assertions) } }