Skip to content

fix(sanitizer): add #[non_exhaustive] to QuarantineError, MemoryValidationError, CausalIpiError #4716

@bug-ops

Description

@bug-ops

Description

Three public error enums in `zeph-sanitizer` are missing `#[non_exhaustive]`, violating the workspace convention established in PR #4658/4660. Downstream crates that match on these error variants will get a compilation break the moment a new variant is added.

Affected Enums

  • `QuarantineError` in `crates/zeph-sanitizer/src/quarantine.rs:52`
  • `MemoryValidationError` in `crates/zeph-sanitizer/src/memory_validation.rs:36`
  • `CausalIpiError` in `crates/zeph-sanitizer/src/causal_ipi.rs:49`

Expected Behavior

All three enums should be annotated with `#[non_exhaustive]` so future variant additions are non-breaking.

Actual Behavior

These enums are exhaustively matched in downstream code. Adding a variant without `#[non_exhaustive]` would be a breaking change.

Fix Direction

Add `#[non_exhaustive]` above each enum definition. Match arms in `zeph-core` and other crates may need a wildcard `_` arm to compile.

Environment

  • Version: 07f96ae
  • Found in: CI-944 arch audit

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexitybugSomething isn't workingmemoryzeph-memory crate (SQLite)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions