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
This commit is contained in:
Michael Bolin
2026-04-01 10:21:12 -07:00
parent c76e4380b4
commit c31efbef25
5 changed files with 4 additions and 38 deletions
@@ -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",
-4
View File
@@ -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",
],
)
+1 -6
View File
@@ -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 }
+2 -9
View File
@@ -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`.
+1 -4
View File
@@ -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 }