Description
cargo clippy --all-targets --features full -- -D warnings fails with 40 compilation errors across 4 integration test targets. The root cause is that integration tests in tests/ import zeph_llm::mock::MockProvider and use AnyProvider::Mock(...) without the testing feature being enabled.
AnyProvider::Mock is gated behind #[cfg(any(test, feature = "testing"))] in crates/zeph-llm/src/any.rs:99. Integration test files compiled via --all-targets are not inside a #[cfg(test)] block, so the Mock variant is invisible unless --features testing is also passed.
Reproduction Steps
cargo clippy --all-targets --features full -- -D warnings
- Observe: 40 errors
error[E0432]: unresolved import `zeph_llm::mock` (10×)
error[E0433]: cannot find `mock` in `zeph_llm` (3×)
error[E0599]: no variant or associated item named `Mock` (27×)
Failing targets:
zeph (test "orchestration_integration") — 1 error
zeph (test "performance_agent_integration") — 4 errors
zeph (test "integration") — 21 errors
zeph (bin "zeph" test) — 14 errors
Expected Behavior
cargo clippy --all-targets --features full compiles cleanly.
Actual Behavior
40 errors due to zeph_llm::mock and AnyProvider::Mock being unavailable without feature = "testing".
Fix Options
Option A (preferred): Add testing to the full feature bundle in Cargo.toml:
full = ["desktop", "ide", "server", "chat", "pdf", "scheduler", "classifiers", "profiling", "task-metrics", "sandbox", "self-check", "gonka", "testing"]
This makes integration test compilation consistent and is the simplest fix.
Option B: Add #[cfg(feature = "testing")] guards around all integration test files in tests/ that import zeph_llm::mock.
Option A is preferred — adding testing to full is already the logical composition for comprehensive builds.
Environment
- Version: v0.20.1 (HEAD 02a6f35)
- Features:
--features full (without testing)
- Observed: CI-701 static analysis, 2026-05-06
Description
cargo clippy --all-targets --features full -- -D warningsfails with 40 compilation errors across 4 integration test targets. The root cause is that integration tests intests/importzeph_llm::mock::MockProviderand useAnyProvider::Mock(...)without thetestingfeature being enabled.AnyProvider::Mockis gated behind#[cfg(any(test, feature = "testing"))]incrates/zeph-llm/src/any.rs:99. Integration test files compiled via--all-targetsare not inside a#[cfg(test)]block, so theMockvariant is invisible unless--features testingis also passed.Reproduction Steps
cargo clippy --all-targets --features full -- -D warningsFailing targets:
zeph(test "orchestration_integration") — 1 errorzeph(test "performance_agent_integration") — 4 errorszeph(test "integration") — 21 errorszeph(bin "zeph" test) — 14 errorsExpected Behavior
cargo clippy --all-targets --features fullcompiles cleanly.Actual Behavior
40 errors due to
zeph_llm::mockandAnyProvider::Mockbeing unavailable withoutfeature = "testing".Fix Options
Option A (preferred): Add
testingto thefullfeature bundle inCargo.toml:This makes integration test compilation consistent and is the simplest fix.
Option B: Add
#[cfg(feature = "testing")]guards around all integration test files intests/that importzeph_llm::mock.Option A is preferred — adding
testingtofullis already the logical composition for comprehensive builds.Environment
--features full(withouttesting)