refactor: add #[non_exhaustive] to extensible pub enums across all remaining crates#4545
Merged
Conversation
…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.
This was referenced May 28, 2026
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
4 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[non_exhaustive]to all extensiblepub enumtypes in the remaining crates not covered by refactor(llm,commands,plugins,sanitizer,skills): add #[non_exhaustive] to extensible pub enums #4533:zeph-memory,zeph-common,zeph-config,zeph-tools,zeph-agent-context,zeph-context,zeph-orchestration,zeph-subagent,zeph-acp,zeph-a2a,zeph-mcp,zeph-channels,zeph-commands,zeph-gateway,zeph-core,zeph-tui, and the root binary.#[non_exhaustive]rollout started in refactor(llm,commands,plugins,sanitizer,skills): add #[non_exhaustive] to extensible pub enums #4533.Closes #4513
Closes #4514
Closes #4532
Test plan
cargo +nightly fmt --check— passcargo clippy --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler -- -D warnings— passRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— passRUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features desktop,ide,server,chat,pdf,scheduler— passcargo nextest run --config-file .github/nextest.toml --workspace --lib --bins— 10123 passed