From c31efbef25d6eb6303f0c5b9fb4bab786f3a8ada Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Wed, 1 Apr 2026 10:21:12 -0700 Subject: [PATCH] cloud-tasks: remove cloud-tasks-client crate features ## Why `codex-cloud-tasks-client` was still using Cargo features to select its HTTP and mock implementations. That leaks feature permutations into both Cargo and Bazel for a crate that does not need them. ## What changed - delete the `online` and `mock` crate features from `codex-cloud-tasks-client` - make `codex-backend-client` unconditional and always export both `HttpClient` and `MockClient` - remove the internal `features = ["mock", "online"]` activation from `codex-cloud-tasks` - remove the matching Bazel `crate_features` override - shrink the manifest verifier allowlist to match the remaining exceptions --- .../scripts/verify_cargo_workspace_manifests.py | 15 --------------- codex-rs/cloud-tasks-client/BUILD.bazel | 4 ---- codex-rs/cloud-tasks-client/Cargo.toml | 7 +------ codex-rs/cloud-tasks-client/src/lib.rs | 11 ++--------- codex-rs/cloud-tasks/Cargo.toml | 5 +---- 5 files changed, 4 insertions(+), 38 deletions(-) diff --git a/.github/scripts/verify_cargo_workspace_manifests.py b/.github/scripts/verify_cargo_workspace_manifests.py index e4e2f49b25..0ad363f5b7 100644 --- a/.github/scripts/verify_cargo_workspace_manifests.py +++ b/.github/scripts/verify_cargo_workspace_manifests.py @@ -25,11 +25,6 @@ UTILITY_NAME_EXCEPTIONS = { "path-utils": "codex-utils-path", } MANIFEST_FEATURE_EXCEPTIONS = { - "codex-rs/cloud-tasks-client/Cargo.toml": { - "default": ("online",), - "online": ("dep:codex-backend-client",), - "mock": (), - }, "codex-rs/otel/Cargo.toml": { "disable-default-metrics-exporter": (), }, @@ -41,11 +36,6 @@ MANIFEST_FEATURE_EXCEPTIONS = { }, } OPTIONAL_DEPENDENCY_EXCEPTIONS = { - ( - "codex-rs/cloud-tasks-client/Cargo.toml", - "dependencies", - "codex-backend-client", - ), ( "codex-rs/tui/Cargo.toml", 'target.cfg(not(target_os = "linux")).dependencies', @@ -53,11 +43,6 @@ OPTIONAL_DEPENDENCY_EXCEPTIONS = { ), } INTERNAL_DEPENDENCY_FEATURE_EXCEPTIONS = { - ( - "codex-rs/cloud-tasks/Cargo.toml", - "dependencies", - "codex-cloud-tasks-client", - ): ("mock", "online"), ( "codex-rs/core/Cargo.toml", "dev-dependencies", diff --git a/codex-rs/cloud-tasks-client/BUILD.bazel b/codex-rs/cloud-tasks-client/BUILD.bazel index cbbd47b761..83157266a5 100644 --- a/codex-rs/cloud-tasks-client/BUILD.bazel +++ b/codex-rs/cloud-tasks-client/BUILD.bazel @@ -3,8 +3,4 @@ load("//:defs.bzl", "codex_rust_crate") codex_rust_crate( name = "cloud-tasks-client", crate_name = "codex_cloud_tasks_client", - crate_features = [ - "mock", - "online", - ], ) diff --git a/codex-rs/cloud-tasks-client/Cargo.toml b/codex-rs/cloud-tasks-client/Cargo.toml index 6774d46fdc..88bb8ade1d 100644 --- a/codex-rs/cloud-tasks-client/Cargo.toml +++ b/codex-rs/cloud-tasks-client/Cargo.toml @@ -11,11 +11,6 @@ path = "src/lib.rs" [lints] workspace = true -[features] -default = ["online"] -online = ["dep:codex-backend-client"] -mock = [] - [dependencies] anyhow = "1" async-trait = "0.1" @@ -24,5 +19,5 @@ diffy = "0.4.2" serde = { version = "1", features = ["derive"] } serde_json = "1" thiserror = "2.0.17" -codex-backend-client = { path = "../backend-client", optional = true } +codex-backend-client = { path = "../backend-client" } codex-git-utils = { workspace = true } diff --git a/codex-rs/cloud-tasks-client/src/lib.rs b/codex-rs/cloud-tasks-client/src/lib.rs index 9519050bae..e37963875f 100644 --- a/codex-rs/cloud-tasks-client/src/lib.rs +++ b/codex-rs/cloud-tasks-client/src/lib.rs @@ -15,16 +15,9 @@ pub use api::TaskSummary; pub use api::TaskText; pub use api::TurnAttempt; -#[cfg(feature = "mock")] -mod mock; - -#[cfg(feature = "online")] mod http; - -#[cfg(feature = "mock")] +mod mock; +pub use http::HttpClient; pub use mock::MockClient; -#[cfg(feature = "online")] -pub use http::HttpClient; - // Reusable apply engine now lives in the shared crate `codex-git-utils`. diff --git a/codex-rs/cloud-tasks/Cargo.toml b/codex-rs/cloud-tasks/Cargo.toml index 7587b341b9..73d05e3191 100644 --- a/codex-rs/cloud-tasks/Cargo.toml +++ b/codex-rs/cloud-tasks/Cargo.toml @@ -16,10 +16,7 @@ anyhow = { workspace = true } base64 = { workspace = true } chrono = { workspace = true, features = ["serde"] } clap = { workspace = true, features = ["derive"] } -codex-cloud-tasks-client = { path = "../cloud-tasks-client", features = [ - "mock", - "online", -] } +codex-cloud-tasks-client = { path = "../cloud-tasks-client" } codex-client = { workspace = true } codex-core = { path = "../core" } codex-git-utils = { workspace = true }