Skip to content

refactor(mcp): add #[non_exhaustive] to all pub enums missed in #4545 #4564

@bug-ops

Description

@bug-ops

Description

12 pub enums in `zeph-mcp` were missed by the #4545 non-exhaustive sweep. All are part of the public API and are extensible by design.

Affected enums

File Enum
`attestation.rs` `AttestationResult`
`error.rs` `McpErrorCode`, `McpError`
`policy.rs` `DataFlowViolation`, `PolicyViolation`
`client.rs` `OAuthConnectResult`
`embedding_guard.rs` `EmbeddingGuardResult`
`manager.rs` `McpTransport`
`sanitize.rs` `CrossRefSeverity`
`pruning.rs` `PruningError`
`semantic_index.rs` `SemanticIndexError`, `ToolDiscoveryStrategy`

Expected Behavior

All extensible pub enums have `#[non_exhaustive]` so downstream match arms do not break on variant additions.

Actual Behavior

None of the above enums have `#[non_exhaustive]`.

Fix

Add `#[non_exhaustive]` attribute above each enum definition. No logic changes required.

Environment

  • Commit: HEAD main
  • Crate: zeph-mcp

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexitytech-debtTechnical debt

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions