From 3484794ea257f563acffde2fe69aac42c6bd97ed Mon Sep 17 00:00:00 2001 From: jif-oai Date: Mon, 13 Jul 2026 18:24:18 +0100 Subject: [PATCH] Fix rg inventory CI checks --- codex-rs/Cargo.lock | 2 +- codex-rs/Cargo.toml | 1 - .../exec-server/src/runtime_paths_tests.rs | 14 ++++++------- codex-rs/rg-shim/Cargo.toml | 21 ++++++------------- codex-rs/rg-shim/src/lib.rs | 2 -- codex-rs/rg-shim/src/manager.rs | 2 +- 6 files changed, 14 insertions(+), 28 deletions(-) diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index 192e365b54..e83fb8455c 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -3813,7 +3813,7 @@ dependencies = [ ] [[package]] -name = "codex-rg" +name = "codex-rg-shim" version = "0.0.0" dependencies = [ "notify", diff --git a/codex-rs/Cargo.toml b/codex-rs/Cargo.toml index 546a3e78b7..6da5891dc5 100644 --- a/codex-rs/Cargo.toml +++ b/codex-rs/Cargo.toml @@ -223,7 +223,6 @@ codex-prompts = { path = "prompts" } codex-responses-api-proxy = { path = "responses-api-proxy" } codex-response-debug-context = { path = "response-debug-context" } codex-rmcp-client = { path = "rmcp-client" } -codex-rg = { path = "rg-shim" } codex-rollout = { path = "rollout" } codex-rollout-trace = { path = "rollout-trace" } codex-sandboxing = { path = "sandboxing" } diff --git a/codex-rs/exec-server/src/runtime_paths_tests.rs b/codex-rs/exec-server/src/runtime_paths_tests.rs index 9782fd2111..71eab6266c 100644 --- a/codex-rs/exec-server/src/runtime_paths_tests.rs +++ b/codex-rs/exec-server/src/runtime_paths_tests.rs @@ -1,5 +1,6 @@ use super::ExecServerRuntimePaths; use super::prepend_package_path; +use codex_utils_absolute_path::AbsolutePathBuf; use pretty_assertions::assert_eq; use std::collections::HashMap; use std::fs; @@ -20,15 +21,12 @@ fn discovers_package_path_from_codex_executable() { let runtime_paths = ExecServerRuntimePaths::new(codex_exe, /*codex_linux_sandbox_exe*/ None) .expect("runtime paths"); - let package_path_dir = fs::canonicalize(package_path_dir).expect("canonical package path"); + let package_path_dir = AbsolutePathBuf::from_absolute_path( + fs::canonicalize(package_path_dir).expect("canonical package path"), + ) + .expect("absolute package path"); - assert_eq!( - runtime_paths - .package_path_dir - .as_ref() - .map(|path| path.as_path()), - Some(package_path_dir.as_path()) - ); + assert_eq!(runtime_paths.package_path_dir, Some(package_path_dir)); } #[test] diff --git a/codex-rs/rg-shim/Cargo.toml b/codex-rs/rg-shim/Cargo.toml index 2c106c853a..5a2049bba3 100644 --- a/codex-rs/rg-shim/Cargo.toml +++ b/codex-rs/rg-shim/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "codex-rg" +name = "codex-rg-shim" version.workspace = true edition.workspace = true license.workspace = true @@ -13,25 +13,16 @@ name = "codex_rg" path = "src/lib.rs" doctest = false -[features] -manager = [ - "dep:notify", - "dep:tempfile", - "dep:tokio", - "dep:tracing", - "dep:uuid", -] - [lints] workspace = true [dependencies] -notify = { workspace = true, optional = true } +notify = { workspace = true } sha2 = { workspace = true } -tempfile = { workspace = true, optional = true } -tokio = { workspace = true, features = ["macros", "rt", "sync"], optional = true } -tracing = { workspace = true, optional = true } -uuid = { workspace = true, features = ["v4"], optional = true } +tempfile = { workspace = true } +tokio = { workspace = true, features = ["macros", "rt", "sync"] } +tracing = { workspace = true } +uuid = { workspace = true, features = ["v4"] } [dev-dependencies] pretty_assertions = { workspace = true } diff --git a/codex-rs/rg-shim/src/lib.rs b/codex-rs/rg-shim/src/lib.rs index a77d574d99..682bc2f05e 100644 --- a/codex-rs/rg-shim/src/lib.rs +++ b/codex-rs/rg-shim/src/lib.rs @@ -64,9 +64,7 @@ pub(crate) fn find_repository_root(cwd: &Path) -> Option { .map(Path::to_path_buf) } -#[cfg(feature = "manager")] mod manager; -#[cfg(feature = "manager")] pub use manager::RgCacheManager; #[cfg(test)] diff --git a/codex-rs/rg-shim/src/manager.rs b/codex-rs/rg-shim/src/manager.rs index dda0b89a72..a75abc924a 100644 --- a/codex-rs/rg-shim/src/manager.rs +++ b/codex-rs/rg-shim/src/manager.rs @@ -88,7 +88,7 @@ impl RgCacheManager { drop(repositories); let manager = self.clone(); - let worker_root = repository_root.clone(); + let worker_root = repository_root; tokio::spawn(async move { if let Err(error) = manager.run_repository(worker_root.clone()).await { warn!(