Skip to content

refactor: add #[non_exhaustive] to remaining pub enums (workspace sweep)#4759

Merged
bug-ops merged 2 commits into
mainfrom
non-exhaustive-batch
May 30, 2026
Merged

refactor: add #[non_exhaustive] to remaining pub enums (workspace sweep)#4759
bug-ops merged 2 commits into
mainfrom
non-exhaustive-batch

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 30, 2026

Summary

Resolves the last batch of public enums missing #[non_exhaustive] across the workspace. Each omission was a forward-compatibility risk for downstream crates that match-exhaustively on these types.

  • Added #[non_exhaustive] to public enums in 14 crates
  • Added wildcard arms only in crates that import the annotated enum (never in the defining crate)
  • All 10 427 tests pass; fmt, clippy, and RUSTFLAGS checks clean

Crates affected: zeph-acp, zeph-channels, zeph-config, zeph-core, zeph-experiments, zeph-index, zeph-llm, zeph-mcp, zeph-orchestration, zeph-skills, zeph-subagent, zeph-tools, zeph-tui, zeph-worktree

Test plan

  • cargo +nightly fmt --check — pass
  • cargo clippy --workspace --features desktop,ide,server,chat,pdf,scheduler -- -D warnings — pass (0 warnings)
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked — pass
  • cargo nextest run --config-file .github/nextest.toml --workspace --lib --bins — 10 427 / 10 427 passed

Closes #4743
Closes #4703
Closes #4735

@github-actions github-actions Bot added documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) skills zeph-skills crate channels zeph-channels crate (Telegram) rust Rust code changes core zeph-core crate refactor Code refactoring without functional changes size/M Medium PR (51-200 lines) labels May 30, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 30, 2026 15:44
@bug-ops bug-ops force-pushed the non-exhaustive-batch branch from 3c5fb9b to 4ba956a Compare May 30, 2026 15:45
bug-ops added 2 commits May 30, 2026 18:00
Resolves the last batch of public enums missing #[non_exhaustive]
across the workspace. Each omission was a semver-breaking change for
downstream crates that match-exhaustively on these types.

Crates affected: zeph-acp, zeph-channels, zeph-config, zeph-core,
zeph-experiments, zeph-index, zeph-llm, zeph-mcp, zeph-orchestration,
zeph-skills, zeph-subagent, zeph-tools, zeph-tui, zeph-worktree.

Added wildcard arms (`_ => unreachable!(...)` or `_ => {}`) only in
crates that import the annotated enum — never in the defining crate.

Closes #4743, #4703, #4735
@bug-ops bug-ops force-pushed the non-exhaustive-batch branch from e55cb2a to 979037e Compare May 30, 2026 16:00
@bug-ops bug-ops merged commit 88c8179 into main May 30, 2026
32 checks passed
@bug-ops bug-ops deleted the non-exhaustive-batch branch May 30, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channels zeph-channels crate (Telegram) core zeph-core crate documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) refactor Code refactoring without functional changes rust Rust code changes size/M Medium PR (51-200 lines) skills zeph-skills crate

Projects

None yet

1 participant