From d6669598d8f08471e1dd6175035d0b9c361f14e5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 10:08:33 +0000 Subject: [PATCH 1/4] chore(deps): update rust crate landlock to v0.4.3 --- codex-rs/Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index b584c85f2..b666b92d2 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -3498,9 +3498,9 @@ dependencies = [ [[package]] name = "landlock" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d2ef408b88e913bfc6594f5e693d57676f6463ded7d8bf994175364320c706" +checksum = "affe8b77dce5b172f8e290bd801b12832a77cd1942d1ea98259916e89d5829d6" dependencies = [ "enumflags2", "libc", From e87a8ed33fa0cf1dd14e71ad9c4d396402d90d00 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Thu, 6 Nov 2025 19:47:32 -0800 Subject: [PATCH 2/4] fix: align landlock workspace version --- 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..b5533f4fc 100644 --- a/codex-rs/Cargo.toml +++ b/codex-rs/Cargo.toml @@ -132,7 +132,7 @@ indexmap = "2.12.0" insta = "1.43.2" itertools = "0.14.0" keyring = "3.6" -landlock = "0.4.1" +landlock = "0.4.3" lazy_static = "1" libc = "0.2.175" log = "0.4" From 1925428d39caedd59320b349a17217a051db5bcf Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Fri, 7 Nov 2025 12:48:15 -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 60121bace2a561510b9c658f8f7d5e4dbde39b9b Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Fri, 7 Nov 2025 13:40:53 -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) } }