Skip to content

refactor: typed control message enums + AcceptErr reply#5

Open
GregoryLi360 wants to merge 10 commits into
majdnasra2/comm-protocolfrom
refactor/control-message-enums
Open

refactor: typed control message enums + AcceptErr reply#5
GregoryLi360 wants to merge 10 commits into
majdnasra2/comm-protocolfrom
refactor/control-message-enums

Conversation

@GregoryLi360
Copy link
Copy Markdown
Contributor

@GregoryLi360 GregoryLi360 commented May 28, 2026

Closes review comments on control/src/protocol.rs:116, :144, and monitor/src/lib.rs:206.

Refactor (464e93d):

  • Adds ControlRequest / ControlReply enums in new control/src/message.rs.
  • Payload parsing via TryFrom<&ControlFrame>, encoding via to_frame().
  • Drops panicking decode methods and the ListenerReady / AcceptListenerId / ErrPayload carrier structs; variants hold the field directly.
  • Wire format unchanged.

AcceptErr (f2bee49):

  • New MessageType::AcceptErr = 9 and ControlReply::AcceptErr { request_id, code }.
  • Monitor sends AcceptErr instead of returning MonitorError::UnknownListener (code 9 / EBADF) and instead of silently swallowing kernel accept failures.
  • Arca side surfaces it as ArcaError::AcceptFailed { code }.
  • PROTOCOL.md §4 catalog updated; §9.4 deferral removed.

29 tests pass (21 control, 6 monitor, 2 e2e). Clippy and fmt clean.

@GregoryLi360 GregoryLi360 force-pushed the refactor/control-message-enums branch from 48aa336 to 464e93d Compare May 28, 2026 21:16
@GregoryLi360 GregoryLi360 changed the title refactor: typed control message enums with TryFrom refactor: typed control message enums + AcceptErr reply May 28, 2026
@GregoryLi360 GregoryLi360 requested review from Akshay-Srivatsan and ruiting-chen and removed request for Akshay-Srivatsan May 28, 2026 23:29
@ruiting-chen ruiting-chen force-pushed the majdnasra2/comm-protocol branch from d762d8e to 8e4e10f Compare May 29, 2026 21:41
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.

3 participants