Skip to content

fix: add #[non_exhaustive] to ChannelError, sanitizer errors, SubAgentError#4737

Merged
bug-ops merged 1 commit into
mainfrom
fix/4716-non-exhaustive-error-enums
May 30, 2026
Merged

fix: add #[non_exhaustive] to ChannelError, sanitizer errors, SubAgentError#4737
bug-ops merged 1 commit into
mainfrom
fix/4716-non-exhaustive-error-enums

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Continues the workspace-wide #[non_exhaustive] cleanup started in PR #4658 (62ccdd4). Without this attribute, adding a new error variant is a semver-breaking change for any downstream crate that matches exhaustively.

  • zeph-core: ChannelError — used by all channel adapters (CLI, Telegram, Discord, Slack); expected to gain new variants as backends expand
  • zeph-sanitizer: QuarantineError, MemoryValidationError, CausalIpiError — three public error enums missing the attribute
  • zeph-subagent: SubAgentError — noted alongside WorktreeError (enhancement(worktree): add #[non_exhaustive] to WorktreeError #4703) as part of the same cleanup

No downstream exhaustive match arms exist for any of these enums, so no wildcard _ arms needed.

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy -p zeph-core -p zeph-sanitizer -p zeph-subagent -- -D warnings — clean
  • RUSTFLAGS="-D warnings" cargo check -p zeph-core -p zeph-sanitizer -p zeph-subagent --all-targets --locked — clean
  • cargo nextest run -p zeph-core -p zeph-sanitizer -p zeph-subagent --lib --bins — 2222 passed, 2 skipped

Closes #4716, #4726, #4732

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate size/S Small PR (11-50 lines) labels May 30, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 30, 2026 02:17
…tError

Continues the workspace-wide non-exhaustive cleanup started in PR #4658.
Without this attribute, any new enum variant is a semver-breaking change
for downstream crates that match exhaustively.

Closes #4716, #4726, #4732
@bug-ops bug-ops force-pushed the fix/4716-non-exhaustive-error-enums branch from 11556f4 to bcad6ed Compare May 30, 2026 02:17
@bug-ops bug-ops merged commit 42eb447 into main May 30, 2026
32 checks passed
@bug-ops bug-ops deleted the fix/4716-non-exhaustive-error-enums branch May 30, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

1 participant