Skip to content

feat(scheduler): add #[non_exhaustive] to TaskProvenance enum #4555

@bug-ops

Description

@bug-ops

Description

TaskProvenance in crates/zeph-scheduler/src/task.rs (line 64) is a public enum without #[non_exhaustive], inconsistent with the project-wide policy introduced in PR #4545.

All other public extensible enums in the same file already have it:

  • TaskKind (line 158) — has #[non_exhaustive]
  • TaskMode (line 234) — has #[non_exhaustive]
  • SchedulerMessage (scheduler.rs:50) — has #[non_exhaustive]

TaskProvenance is clearly extensible — future variants like Webhook, Api, or Signed are plausible additions for the RTW-A trust model.

Expected Behavior

TaskProvenance should be annotated with #[non_exhaustive] so downstream match arms use _ => fallback and do not break on future variant additions.

Actual Behavior

#[non_exhaustive] is absent, making exhaustive matches compile-time valid today but source-breaking when a new variant is added.

Environment

  • Version: HEAD 53f8f05
  • File: crates/zeph-scheduler/src/task.rs line 64

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexityenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions