fluxer-proto: ChannelType/MessageType values above 65535 fail deserialization instead of mapping to Unknown #30

Open
opened 2026-11-11 08:38:31 +00:00 by charles · 0 comments
Owner

From the review of PR #29 (Task 2, #2).

ChannelType and MessageType deserialize through u16 (the plan specifies Unknown(u16)). A wire value that does not fit (above 65535, or negative) is therefore a deserialization error for the enclosing Channel / Message, not Unknown. It is not a panic, and it is pinned by channel_type_unknown_value_preserved in crates/fluxer-proto/tests/primitives.rs and documented in the crate README and enums.rs.

To decide:

  • keep as is (Tasks 3 and 4 must then expect that one out-of-range type rejects the whole channel or message), or
  • widen the fallback (for example Unknown(u32)) so any non-negative integer the server could send is kept. This changes the Interfaces block of Task 2 in the Foundation plan.

The fork's current values are all below 1000, so nothing sent today is affected.

Seen on commit 281ce70 (branch task/2-proto-primitives).

From the review of PR #29 (Task 2, #2). `ChannelType` and `MessageType` deserialize through `u16` (the plan specifies `Unknown(u16)`). A wire value that does not fit (above 65535, or negative) is therefore a deserialization error for the enclosing `Channel` / `Message`, not `Unknown`. It is not a panic, and it is pinned by `channel_type_unknown_value_preserved` in `crates/fluxer-proto/tests/primitives.rs` and documented in the crate README and `enums.rs`. To decide: - keep as is (Tasks 3 and 4 must then expect that one out-of-range `type` rejects the whole channel or message), or - widen the fallback (for example `Unknown(u32)`) so any non-negative integer the server could send is kept. This changes the Interfaces block of Task 2 in the Foundation plan. The fork's current values are all below 1000, so nothing sent today is affected. Seen on commit 281ce70 (branch `task/2-proto-primitives`).
charles added this to the Foundation milestone 2026-11-11 08:38:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#30
No description provided.