Lightweight coding agent that runs in your terminal
Rust
[codex] Fix current main CI blockers (#17917)
sayan-oaib99a62c5269d
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lockindex 83eb490f9d..59ae93bf13 100644--- a/MODULE.bazel.lock+++ b/MODULE.bazel.lock@@ -1239,7 +1239,7 @@"rama-unix_0.3.0-alpha.4": "{\"dependencies\":[{\"name\":\"pin-project-lite\",\"req\":\"^0.2\"},{\"name\":\"rama-core\",\"req\":\"^0.3.0-alpha.4\"},{\"name\":\"rama-net\",\"req\":\"^0.3.0-alpha.4\"},{\"features\":[\"macros\",\"net\"],\"name\":\"tokio\",\"req\":\"^1.48\"},{\"features\":[\"full\"],\"kind\":\"dev\",\"name\":\"tokio\",\"req\":\"^1.48\"}],\"features\":{\"default\":[]}}","rama-utils_0.3.0-alpha.4": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"ahash\",\"req\":\"^0.8\"},{\"name\":\"const_format\",\"req\":\"^0.2\"},{\"kind\":\"dev\",\"name\":\"loom\",\"req\":\"^0.7\",\"target\":\"cfg(loom)\"},{\"name\":\"parking_lot\",\"req\":\"^0.12\"},{\"name\":\"pin-project-lite\",\"req\":\"^0.2\"},{\"kind\":\"dev\",\"name\":\"quickcheck\",\"req\":\"^1.0\"},{\"name\":\"rama-macros\",\"req\":\"^0.3.0-alpha.4\"},{\"name\":\"regex\",\"req\":\"^1.12\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"serde_test\",\"req\":\"^1\"},{\"features\":[\"write\",\"serde\",\"const_generics\",\"const_new\"],\"name\":\"smallvec\",\"req\":\"^1.15\"},{\"name\":\"smol_str\",\"req\":\"^0.3\"},{\"features\":[\"time\",\"macros\"],\"name\":\"tokio\",\"req\":\"^1.48\"},{\"kind\":\"dev\",\"name\":\"tokio-test\",\"req\":\"^0.4\"},{\"kind\":\"dev\",\"name\":\"trybuild\",\"req\":\"^1.0\"},{\"name\":\"wildcard\",\"req\":\"^0.3\"}],\"features\":{}}","rand_0.8.5": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"bincode\",\"req\":\"^1.2.1\"},{\"default_features\":false,\"name\":\"libc\",\"optional\":true,\"req\":\"^0.2.22\",\"target\":\"cfg(unix)\"},{\"name\":\"log\",\"optional\":true,\"req\":\"^0.4.4\"},{\"features\":[\"into_bits\"],\"name\":\"packed_simd\",\"optional\":true,\"package\":\"packed_simd_2\",\"req\":\"^0.3.7\"},{\"default_features\":false,\"name\":\"rand_chacha\",\"optional\":true,\"req\":\"^0.3.0\"},{\"name\":\"rand_core\",\"req\":\"^0.6.0\"},{\"kind\":\"dev\",\"name\":\"rand_pcg\",\"req\":\"^0.3.0\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.103\"}],\"features\":{\"alloc\":[\"rand_core/alloc\"],\"default\":[\"std\",\"std_rng\"],\"getrandom\":[\"rand_core/getrandom\"],\"min_const_gen\":[],\"nightly\":[],\"serde1\":[\"serde\",\"rand_core/serde1\"],\"simd_support\":[\"packed_simd\"],\"small_rng\":[],\"std\":[\"rand_core/std\",\"rand_chacha/std\",\"alloc\",\"getrandom\",\"libc\"],\"std_rng\":[\"rand_chacha\"]}}",- "rand_0.9.2": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"bincode\",\"req\":\"^1.2.1\"},{\"name\":\"log\",\"optional\":true,\"req\":\"^0.4.4\"},{\"default_features\":false,\"name\":\"rand_chacha\",\"optional\":true,\"req\":\"^0.9.0\"},{\"default_features\":false,\"name\":\"rand_core\",\"req\":\"^0.9.0\"},{\"kind\":\"dev\",\"name\":\"rand_pcg\",\"req\":\"^0.9.0\"},{\"kind\":\"dev\",\"name\":\"rayon\",\"req\":\"^1.7\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.103\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.140\"}],\"features\":{\"alloc\":[],\"default\":[\"std\",\"std_rng\",\"os_rng\",\"small_rng\",\"thread_rng\"],\"log\":[\"dep:log\"],\"nightly\":[],\"os_rng\":[\"rand_core/os_rng\"],\"serde\":[\"dep:serde\",\"rand_core/serde\"],\"simd_support\":[],\"small_rng\":[],\"std\":[\"rand_core/std\",\"rand_chacha?/std\",\"alloc\"],\"std_rng\":[\"dep:rand_chacha\"],\"thread_rng\":[\"std\",\"std_rng\",\"os_rng\"],\"unbiased\":[]}}",+ "rand_0.9.3": "{\"dependencies\":[{\"kind\":\"dev\",\"name\":\"bincode\",\"req\":\"^1.2.1\"},{\"default_features\":false,\"name\":\"rand_chacha\",\"optional\":true,\"req\":\"^0.9.0\"},{\"default_features\":false,\"name\":\"rand_core\",\"req\":\"^0.9.0\"},{\"kind\":\"dev\",\"name\":\"rand_pcg\",\"req\":\"^0.9.0\"},{\"kind\":\"dev\",\"name\":\"rayon\",\"req\":\"^1.7\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0.103\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0.140\"}],\"features\":{\"alloc\":[],\"default\":[\"std\",\"std_rng\",\"os_rng\",\"small_rng\",\"thread_rng\"],\"log\":[],\"nightly\":[],\"os_rng\":[\"rand_core/os_rng\"],\"serde\":[\"dep:serde\",\"rand_core/serde\"],\"simd_support\":[],\"small_rng\":[],\"std\":[\"rand_core/std\",\"rand_chacha?/std\",\"alloc\"],\"std_rng\":[\"dep:rand_chacha\"],\"thread_rng\":[\"std\",\"std_rng\",\"os_rng\"],\"unbiased\":[]}}","rand_chacha_0.3.1": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"simd\"],\"name\":\"ppv-lite86\",\"req\":\"^0.2.8\"},{\"name\":\"rand_core\",\"req\":\"^0.6.0\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0\"}],\"features\":{\"default\":[\"std\"],\"serde1\":[\"serde\"],\"simd\":[],\"std\":[\"ppv-lite86/std\"]}}","rand_chacha_0.9.0": "{\"dependencies\":[{\"default_features\":false,\"features\":[\"simd\"],\"name\":\"ppv-lite86\",\"req\":\"^0.2.14\"},{\"name\":\"rand_core\",\"req\":\"^0.9.0\"},{\"features\":[\"os_rng\"],\"kind\":\"dev\",\"name\":\"rand_core\",\"req\":\"^0.9.0\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1.0\"},{\"kind\":\"dev\",\"name\":\"serde_json\",\"req\":\"^1.0\"}],\"features\":{\"default\":[\"std\"],\"os_rng\":[\"rand_core/os_rng\"],\"serde\":[\"dep:serde\"],\"std\":[\"ppv-lite86/std\",\"rand_core/std\"]}}","rand_core_0.6.4": "{\"dependencies\":[{\"name\":\"getrandom\",\"optional\":true,\"req\":\"^0.2\"},{\"features\":[\"derive\"],\"name\":\"serde\",\"optional\":true,\"req\":\"^1\"}],\"features\":{\"alloc\":[],\"serde1\":[\"serde\"],\"std\":[\"alloc\",\"getrandom\",\"getrandom/std\"]}}",diff --git a/codex-rs/.cargo/audit.toml b/codex-rs/.cargo/audit.tomlindex 425997f6ae..3760d28648 100644--- a/codex-rs/.cargo/audit.toml+++ b/codex-rs/.cargo/audit.toml@@ -1,9 +1,10 @@[advisories]-# Reviewed 2026-04-11. Keep this list in sync with ../deny.toml.+# Reviewed 2026-04-15. Keep this list in sync with ../deny.toml.ignore = ["RUSTSEC-2024-0388", # derivative 2.2.0 via starlark; upstream crate is unmaintained"RUSTSEC-2025-0057", # fxhash 0.2.1 via starlark_map; upstream crate is unmaintained"RUSTSEC-2024-0436", # paste 1.0.15 via starlark/ratatui; upstream crate is unmaintained"RUSTSEC-2024-0320", # yaml-rust via syntect; remove when syntect drops or updates it"RUSTSEC-2025-0141", # bincode via syntect; remove when syntect drops or updates it+ "RUSTSEC-2026-0097", # rand 0.8.5 via age/codex-secrets and zbus/keyring; remove when transitive deps move to rand >=0.9.3]diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lockindex 9e446bbc11..381ea3a11f 100644--- a/codex-rs/Cargo.lock+++ b/codex-rs/Cargo.lock@@ -1729,7 +1729,7 @@ dependencies = ["opentelemetry","opentelemetry_sdk","pretty_assertions",- "rand 0.9.2",+ "rand 0.9.3","reqwest","rustls","rustls-native-certs",@@ -1974,7 +1974,7 @@ dependencies = ["opentelemetry_sdk","predicates","pretty_assertions",- "rand 0.9.2",+ "rand 0.9.3","regex-lite","reqwest","rmcp",@@ -2327,7 +2327,7 @@ dependencies = ["once_cell","os_info","pretty_assertions",- "rand 0.9.2",+ "rand 0.9.3","regex-lite","reqwest","serde",@@ -2722,7 +2722,7 @@ dependencies = ["codex-keyring-store","keyring","pretty_assertions",- "rand 0.9.2",+ "rand 0.9.3","regex","schemars 0.8.22","serde",@@ -2921,7 +2921,7 @@ dependencies = ["pathdiff","pretty_assertions","pulldown-cmark",- "rand 0.9.2",+ "rand 0.9.3","ratatui","ratatui-macros","regex-lite",@@ -5163,7 +5163,7 @@ dependencies = ["idna","ipnet","once_cell",- "rand 0.9.2",+ "rand 0.9.3","ring","thiserror 2.0.18","tinyvec",@@ -5185,7 +5185,7 @@ dependencies = ["moka","once_cell","parking_lot",- "rand 0.9.2",+ "rand 0.9.3","resolv-conf","smallvec","thiserror 2.0.18",@@ -7331,7 +7331,7 @@ dependencies = ["futures-util","opentelemetry","percent-encoding",- "rand 0.9.2",+ "rand 0.9.3","thiserror 2.0.18","tokio","tokio-stream",@@ -7880,7 +7880,7 @@ checksum = "bee689443a2bd0a16ab0348b52ee43e3b2d1b1f931c8aa5c9f8de4c86fbe8c40"dependencies = ["bitflags 2.10.0","num-traits",- "rand 0.9.2",+ "rand 0.9.3","rand_chacha 0.9.0","rand_xorshift","regex-syntax 0.8.8",@@ -8051,7 +8051,7 @@ dependencies = ["bytes","getrandom 0.3.4","lru-slab",- "rand 0.9.2",+ "rand 0.9.3","ring","rustc-hash 2.1.1","rustls",@@ -8183,7 +8183,7 @@ dependencies = ["rama-http-types","rama-net","rama-utils",- "rand 0.9.2",+ "rand 0.9.3","serde","serde_html_form","serde_json",@@ -8253,7 +8253,7 @@ dependencies = ["rama-macros","rama-net","rama-utils",- "rand 0.9.2",+ "rand 0.9.3","serde","sha1",]@@ -8281,7 +8281,7 @@ dependencies = ["rama-error","rama-macros","rama-utils",- "rand 0.9.2",+ "rand 0.9.3","serde","serde_json","sync_wrapper",@@ -8355,7 +8355,7 @@ dependencies = ["rama-http-types","rama-net","rama-utils",- "rand 0.9.2",+ "rand 0.9.3","tokio",]@@ -8435,9 +8435,9 @@ dependencies = [[[package]]name = "rand"-version = "0.9.2"+version = "0.9.3"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"+checksum = "7ec095654a25171c2124e9e3393a930bddbffdc939556c914957a4c3e0a87166"dependencies = ["rand_chacha 0.9.0","rand_core 0.9.5",@@ -8752,7 +8752,7 @@ dependencies = ["pastey","pin-project-lite","process-wrap",- "rand 0.9.2",+ "rand 0.9.3","reqwest","rmcp-macros","schemars 1.2.1",@@ -9336,7 +9336,7 @@ version = "0.46.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "26ab054c34b87f96c3e4701bea1888317cde30cc7e4a6136d2c48454ab96661c"dependencies = [- "rand 0.9.2",+ "rand 0.9.3","sentry-types","serde","serde_json",@@ -9384,7 +9384,7 @@ checksum = "eecbd63e9d15a26a40675ed180d376fcb434635d2e33de1c24003f61e3e2230d"dependencies = ["debugid","hex",- "rand 0.9.2",+ "rand 0.9.3","serde","serde_json","thiserror 2.0.18",@@ -11169,7 +11169,7 @@ dependencies = ["http 1.4.0","httparse","log",- "rand 0.9.2",+ "rand 0.9.3","rustls","rustls-pki-types","sha1",diff --git a/codex-rs/core/src/plugins/marketplace_add.rs b/codex-rs/core/src/plugins/marketplace_add.rsindex 49c1c2e565..b8d1b34d41 100644--- a/codex-rs/core/src/plugins/marketplace_add.rs+++ b/codex-rs/core/src/plugins/marketplace_add.rs@@ -275,9 +275,15 @@ mod tests {);let config = fs::read_to_string(codex_home.path().join(codex_config::CONFIG_TOML_FILE))?;- assert!(config.contains("[marketplaces.debug]"));- assert!(config.contains("source_type = \"local\""));- assert!(config.contains(&format!("source = \"{expected_source}\"")));+ let config: toml::Value = toml::from_str(&config)?;+ assert_eq!(+ config["marketplaces"]["debug"]["source_type"].as_str(),+ Some("local")+ );+ assert_eq!(+ config["marketplaces"]["debug"]["source"].as_str(),+ Some(expected_source.as_str())+ );Ok(())}diff --git a/codex-rs/core/src/plugins/marketplace_add/metadata.rs b/codex-rs/core/src/plugins/marketplace_add/metadata.rsindex ce271b116d..b9412e7f0b 100644--- a/codex-rs/core/src/plugins/marketplace_add/metadata.rs+++ b/codex-rs/core/src/plugins/marketplace_add/metadata.rs@@ -296,19 +296,11 @@ mod tests {r#"{"name":"debug","plugins":[]}"#,).unwrap();- fs::write(- codex_home.path().join(CONFIG_TOML_FILE),- format!(- "[marketplaces.debug]\nsource_type = \"local\"\nsource = \"{}\"\n",- source_root.display()- ),- )- .unwrap();-let source = MarketplaceSource::Local {path: source_root.clone(),};let install_metadata = MarketplaceInstallMetadata::from_source(&source, &[]);+ record_added_marketplace_entry(codex_home.path(), "debug", &install_metadata).unwrap();let root = installed_marketplace_root_for_source(codex_home.path(),diff --git a/codex-rs/core/src/plugins/marketplace_add/source.rs b/codex-rs/core/src/plugins/marketplace_add/source.rsindex 19fec57ade..53d52058aa 100644--- a/codex-rs/core/src/plugins/marketplace_add/source.rs+++ b/codex-rs/core/src/plugins/marketplace_add/source.rs@@ -124,9 +124,9 @@ fn normalize_git_url(url: &str) -> String {}fn looks_like_local_path(source: &str) -> bool {- source.starts_with("./")+ Path::new(source).is_absolute()+ || source.starts_with("./")|| source.starts_with("../")- || source.starts_with('/')|| source.starts_with("~/")|| source == "."|| source == ".."diff --git a/codex-rs/deny.toml b/codex-rs/deny.tomlindex 088cda0ba1..bed4a4f2fa 100644--- a/codex-rs/deny.toml+++ b/codex-rs/deny.toml@@ -70,7 +70,7 @@ feature-depth = 1# A list of advisory IDs to ignore. Note that ignored advisories will still# output a note when they are encountered.ignore = [- # Reviewed 2026-04-11. Keep this list in sync with .cargo/audit.toml.+ # Reviewed 2026-04-15. Keep this list in sync with .cargo/audit.toml.# Each exception must identify the dependency path and removal condition.{ id = "RUSTSEC-2024-0388", reason = "derivative is unmaintained; pulled in via starlark v0.13.0 used by execpolicy/cli/core; no fixed release yet" },{ id = "RUSTSEC-2025-0057", reason = "fxhash is unmaintained; pulled in via starlark_map/starlark v0.13.0 used by execpolicy/cli/core; no fixed release yet" },@@ -78,6 +78,7 @@ ignore = [# TODO(fcoury): remove this exception when syntect drops yaml-rust and bincode, or updates to versions that have fixed the vulnerabilities.{ id = "RUSTSEC-2024-0320", reason = "yaml-rust is unmaintained; pulled in via syntect v5.3.0 used by codex-tui for syntax highlighting; no fixed release yet" },{ id = "RUSTSEC-2025-0141", reason = "bincode is unmaintained; pulled in via syntect v5.3.0 used by codex-tui for syntax highlighting; no fixed release yet" },+ { id = "RUSTSEC-2026-0097", reason = "rand 0.8.5 is pulled in via age v0.11.2/codex-secrets and zbus v4.4.0/keyring; no compatible rand 0.8 fixed release, remove when transitive dependencies move to rand >=0.9.3" },]# If this is true, then cargo deny will use the git executable to fetch advisory database.# If this is false, then it uses a built-in git library.