Skip to content

Remove redundant schema feature gate from zeph-llm #2100

@bug-ops

Description

@bug-ops

Summary

zeph-llm declares a schema feature gating schemars as an optional dependency with default = ["schema"]. However, schemars is a non-optional dependency in 7 other workspace crates (zeph-core, zeph-tools, zeph-skills, zeph-mcp, zeph-acp, zeph-orchestration, zeph-memory). Since all these crates are compiled in every build, schemars is always present in the dependency graph — making the 37 #[cfg(feature = "schema")] annotations in zeph-llm redundant.

Changes

  1. Make schemars a non-optional dependency in crates/zeph-llm/Cargo.toml
  2. Remove schema feature declaration and default = ["schema"]
  3. Remove 37 #[cfg(feature = "schema")] annotations from zeph-llm source files
  4. Remove "zeph-llm/schema" from root Cargo.toml feature propagation (if any)

Impact

  • Eliminates 37 cfg annotations — cleaner code, less cognitive overhead
  • No behavioral change: schemars was always compiled via other crates
  • No binary size change

Risk

LOW. The feature was always effectively enabled.

Analysis

Full details: .local/reports/feature-stabilization-analysis.md, Section 5.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance tasksllmzeph-llm crate (Ollama, Claude)size/MMedium PR (51-200 lines)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions