Skip to content

refactor: add #[non_exhaustive] to extensible pub enums across all remaining crates#4545

Merged
bug-ops merged 1 commit into
mainfrom
non-exhaustive-enums
May 28, 2026
Merged

refactor: add #[non_exhaustive] to extensible pub enums across all remaining crates#4545
bug-ops merged 1 commit into
mainfrom
non-exhaustive-enums

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Closes #4513
Closes #4514
Closes #4532

Test plan

  • cargo +nightly fmt --check — pass
  • cargo clippy --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler -- -D warnings — pass
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked — pass
  • RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features desktop,ide,server,chat,pdf,scheduler — pass
  • cargo nextest run --config-file .github/nextest.toml --workspace --lib --bins — 10123 passed

…p,a2a,tui,core): add #[non_exhaustive] to extensible pub enums

Marks all extensible public enums across the remaining crates as
#[non_exhaustive] so that adding new variants in future releases is
not a breaking change for downstream crates.

Crates covered: zeph-memory, zeph-common, zeph-config, zeph-tools,
zeph-agent-context, zeph-context, zeph-orchestration, zeph-subagent,
zeph-acp, zeph-a2a, zeph-mcp, zeph-core, zeph-tui, and the root
binary (src/).

Closes #4513, #4514.
@github-actions github-actions Bot added refactor Code refactoring without functional changes size/L Large PR (201-500 lines) documentation Improvements or additions to documentation skills zeph-skills crate memory zeph-memory crate (SQLite) channels zeph-channels crate (Telegram) rust Rust code changes core zeph-core crate labels May 28, 2026
@bug-ops bug-ops merged commit bba7514 into main May 28, 2026
35 checks passed
@bug-ops bug-ops deleted the non-exhaustive-enums branch May 28, 2026 19:44
bug-ops added a commit that referenced this pull request May 28, 2026
…zeph-mcp

Add #[non_exhaustive] to 12 pub enums in zeph-mcp that were missed by
the #4545 sweep: AttestationResult, McpErrorCode, McpError,
DataFlowViolation, PolicyViolation, OAuthConnectResult,
EmbeddingGuardResult, McpTransport, CrossRefSeverity, PruningError,
SemanticIndexError, ToolDiscoveryStrategy.

Add wildcard arm to the ToolDiscoveryStrategy match in
zeph-core assembly.rs to handle future variants introduced by the
now-non_exhaustive enum; falls back to sync_executor_tools() matching
the None variant behavior.

Closes #4564
Closes #4575
bug-ops added a commit that referenced this pull request May 28, 2026
…zeph-mcp (#4599)

Add #[non_exhaustive] to 12 pub enums in zeph-mcp that were missed by
the #4545 sweep: AttestationResult, McpErrorCode, McpError,
DataFlowViolation, PolicyViolation, OAuthConnectResult,
EmbeddingGuardResult, McpTransport, CrossRefSeverity, PruningError,
SemanticIndexError, ToolDiscoveryStrategy.

Add wildcard arm to the ToolDiscoveryStrategy match in
zeph-core assembly.rs to handle future variants introduced by the
now-non_exhaustive enum; falls back to sync_executor_tools() matching
the None variant behavior.

Closes #4564
Closes #4575
bug-ops added a commit that referenced this pull request May 29, 2026
…ve] to extensible pub enums

Adds #[non_exhaustive] to 22 pub enums across five crates that were missed
by the sweep in #4545:

- zeph-agent-feedback: CorrectionKind, JudgeError
- zeph-experiments: EvalError, ExperimentSource
- zeph-plugins: AutoUpdateStatus
- zeph-skills: PromotionRecommendation, SkillSource, FailureKind, SkillOutcome,
  SkillVerdict, MergeDecision, SkillEvent, SkillError, SkillRole, GroupResult
- zeph-tui: DiffLineKind, AgentManagerState, ToolKind, ToolStatus, TuiCommand,
  AppEvent, AgentEvent, TuiError, InputMode, MessageRole

Wildcard match arms added in zeph-core (assembly.rs, heuristic_promotion.rs,
skill_management.rs) and the zeph binary (bootstrap/mod.rs, commands/skill.rs)
to preserve exhaustive pattern coverage.

Closes #4561, #4563, #4565.
bug-ops added a commit that referenced this pull request May 29, 2026
…ve] to extensible pub enums

Adds #[non_exhaustive] to 22 pub enums across five crates that were missed
by the sweep in #4545:

- zeph-agent-feedback: CorrectionKind, JudgeError
- zeph-experiments: EvalError, ExperimentSource
- zeph-plugins: AutoUpdateStatus
- zeph-skills: PromotionRecommendation, SkillSource, FailureKind, SkillOutcome,
  SkillVerdict, MergeDecision, SkillEvent, SkillError, SkillRole, GroupResult
- zeph-tui: DiffLineKind, AgentManagerState, ToolKind, ToolStatus, TuiCommand,
  AppEvent, AgentEvent, TuiError, InputMode, MessageRole

Wildcard match arms added in zeph-core (assembly.rs, heuristic_promotion.rs,
skill_management.rs) and the zeph binary (bootstrap/mod.rs, commands/skill.rs)
to preserve exhaustive pattern coverage.

Closes #4561, #4563, #4565.
bug-ops added a commit that referenced this pull request May 29, 2026
…ve] to extensible pub enums

Adds #[non_exhaustive] to 22 pub enums across five crates that were missed
by the sweep in #4545:

- zeph-agent-feedback: CorrectionKind, JudgeError
- zeph-experiments: EvalError, ExperimentSource
- zeph-plugins: AutoUpdateStatus
- zeph-skills: PromotionRecommendation, SkillSource, FailureKind, SkillOutcome,
  SkillVerdict, MergeDecision, SkillEvent, SkillError, SkillRole, GroupResult
- zeph-tui: DiffLineKind, AgentManagerState, ToolKind, ToolStatus, TuiCommand,
  AppEvent, AgentEvent, TuiError, InputMode, MessageRole

Wildcard match arms added in zeph-core (assembly.rs, heuristic_promotion.rs,
skill_management.rs) and the zeph binary (bootstrap/mod.rs, commands/skill.rs)
to preserve exhaustive pattern coverage.

Closes #4561, #4563, #4565.
bug-ops added a commit that referenced this pull request May 29, 2026
…ve] to extensible pub enums (#4616)

Adds #[non_exhaustive] to 22 pub enums across five crates that were missed
by the sweep in #4545:

- zeph-agent-feedback: CorrectionKind, JudgeError
- zeph-experiments: EvalError, ExperimentSource
- zeph-plugins: AutoUpdateStatus
- zeph-skills: PromotionRecommendation, SkillSource, FailureKind, SkillOutcome,
  SkillVerdict, MergeDecision, SkillEvent, SkillError, SkillRole, GroupResult
- zeph-tui: DiffLineKind, AgentManagerState, ToolKind, ToolStatus, TuiCommand,
  AppEvent, AgentEvent, TuiError, InputMode, MessageRole

Wildcard match arms added in zeph-core (assembly.rs, heuristic_promotion.rs,
skill_management.rs) and the zeph binary (bootstrap/mod.rs, commands/skill.rs)
to preserve exhaustive pattern coverage.

Closes #4561, #4563, #4565.
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 memory zeph-memory crate (SQLite) refactor Code refactoring without functional changes rust Rust code changes size/L Large PR (201-500 lines) skills zeph-skills crate

Projects

None yet

1 participant