Skip to content

Clean up broker protocol enums#951

Merged
wdcui merged 6 commits into
uliteboxfrom
wdcui/ulitebox/enum-cleanup
Jun 24, 2026
Merged

Clean up broker protocol enums#951
wdcui merged 6 commits into
uliteboxfrom
wdcui/ulitebox/enum-cleanup

Conversation

@wdcui

@wdcui wdcui commented Jun 23, 2026

Copy link
Copy Markdown
Member

Simplify broker protocol enums by removing redundant non_exhaustive markers, the WaitOutcome wrapper, and the ErrorCode::Unknown variant. Event waits now return ReadinessState directly, and unknown raw broker error codes decode as invalid wire tags.

wdcui and others added 6 commits June 23, 2026 16:25
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wdcui wdcui added this pull request to the merge queue Jun 24, 2026
Merged via the queue into ulitebox with commit 6d21451 Jun 24, 2026
8 checks passed
@wdcui wdcui deleted the wdcui/ulitebox/enum-cleanup branch June 24, 2026 01:20
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field WaitEventResponse.readiness in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/event.rs:49
  field WaitEventResponse.readiness in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/event.rs:49

--- failure enum_missing: pub enum removed or renamed ---

Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_missing.ron

Failed in:
  enum litebox_broker_protocol::event::WaitOutcome, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/7dc0e734a3aa4f1677fa0c058ea3444ed8f3494b/litebox_broker_protocol/src/event.rs:18
  enum litebox_broker_protocol::WaitOutcome, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/7dc0e734a3aa4f1677fa0c058ea3444ed8f3494b/litebox_broker_protocol/src/event.rs:18

--- failure enum_variant_missing: pub enum variant removed or renamed ---

Description:
A publicly-visible enum has at least one variant that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/enum_variant_missing.ron

Failed in:
  variant ErrorCode::Unknown, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/7dc0e734a3aa4f1677fa0c058ea3444ed8f3494b/litebox_broker_protocol/src/error.rs:35
  variant ErrorCode::Unknown, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/7dc0e734a3aa4f1677fa0c058ea3444ed8f3494b/litebox_broker_protocol/src/error.rs:35

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field outcome of struct WaitEventResponse, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/7dc0e734a3aa4f1677fa0c058ea3444ed8f3494b/litebox_broker_protocol/src/event.rs:60
  field outcome of struct WaitEventResponse, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/7dc0e734a3aa4f1677fa0c058ea3444ed8f3494b/litebox_broker_protocol/src/event.rs:60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant