Skip to content

arch(channels,gateway,a2a): extensible pub enums missing #[non_exhaustive] #4532

@bug-ops

Description

@bug-ops

Description

Several extensible pub enums across four crates are missing `#[non_exhaustive]`, which forces downstream crates to add wildcard match arms on any upgrade if a new variant is ever added.

Enum Crate File
`AnyChannel` `zeph-channels` `any.rs:54`
`TelegramApiError` `zeph-channels` `telegram_api_ext.rs:143`
`ChatMemberStatus` `zeph-channels` `telegram_api_ext.rs:95`
`ReadLineResult` `zeph-channels` `line_editor.rs:32`
`SlashCategory` `zeph-commands` `lib.rs:110`
`GatewayError` `zeph-gateway` `error.rs:10`
`A2aError` `zeph-a2a` `error.rs:16`
`ProcessorEvent` `zeph-a2a` `server/state.rs:42`
`CancelError` `zeph-a2a` `server/state.rs:247`
`IbctError` `zeph-a2a` `ibct.rs:48`

`TaskState`, `Role`, `Part`, and `TaskEvent` in `zeph-a2a/types.rs` already have `#[non_exhaustive]` — the above are the remaining gaps.

Expected Behavior

All extensible pub enums have `#[non_exhaustive]` so that adding a variant in a patch release does not break downstream match expressions.

Actual Behavior

Missing attribute — downstream match expressions will require updates on any variant addition.

Environment

  • Version: HEAD 05d2cc8
  • Detected during CI-887 architecture audit

Fix

Add `#[non_exhaustive]` to each enum listed above. Part of the broader `non_exhaustive` sweep tracked in #4513, #4514, #4515, #4517, #4520, #4527.

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexityarchArchitecture and design

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions