Skip to content

refactor(feedback,experiments,plugins): add #[non_exhaustive] to extensible pub enums missed in #4545 #4561

@bug-ops

Description

@bug-ops

Description

PR #4545 (bba7514) added #[non_exhaustive] to extensible pub enums across 14 crates, but three crates were not included in its scope:

  • zeph-agent-feedback: CorrectionKind, JudgeError
  • zeph-experiments: EvalError, ExperimentSource
  • zeph-plugins: AutoUpdateStatus

All of these are extensible pub enums — new variants are expected as features grow. Without #[non_exhaustive], adding a variant is a breaking change for downstream match statements.

Missing annotations

crates/zeph-agent-feedback/src/lib.rs:

  • CorrectionKind (line 364) — new correction types may be added (e.g. ToneChange, ScopeNarrow)
  • JudgeError (line 585) — new error variants are expected as judge logic evolves

crates/zeph-experiments/src/types.rs:

  • ExperimentSource (line 256) — new trigger sources expected (Remote, Webhook, A2A)

crates/zeph-experiments/src/error.rs:

  • EvalError (line 23) — error enums should always be #[non_exhaustive]

crates/zeph-plugins/src/manager.rs:

  • AutoUpdateStatus (line 118) — new update states likely as plugin lifecycle grows

Fix

Add #[non_exhaustive] to each listed enum. VariationValue (Float/Int) is a closed value type and deliberately omitted.

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