fix(protocol): align terminal receipt conformance
Verify Protocol / verify (push) Canceled after 0s
Verify Protocol / module (push) Successful in 1m50s

This commit is contained in:
sechmachine
2026-07-30 14:20:48 +07:00
parent 021ecf425f
commit 30bb1a2fa3
12 changed files with 121 additions and 8 deletions
+7 -2
View File
@@ -53,8 +53,9 @@ is the following exact envelope:
| 6 | 2 | payload length | exact payload byte count |
| 8 | N | payload | exact type-specific body |
The client-to-gateway types are `0x01` IDR request (empty) and `0x02` FEC
status: `frame_index` (u32), `highest_received_sequence` (u16),
The client-to-gateway types are `0x01` IDR request (empty), `0x02` FEC
status, and `0x03` terminal receipt (empty). FEC status contains
`frame_index` (u32), `highest_received_sequence` (u16),
`next_contiguous_sequence` (u16), `missing_before_highest` (u16),
`total_data_packets` (u16), `total_parity_packets` (u16),
`received_data_packets` (u16), `received_parity_packets` (u16),
@@ -63,6 +64,10 @@ status: `frame_index` (u32), `highest_received_sequence` (u16),
the provider's unsequenced ENet FEC delivery; it does not put it on the reliable
provider input path.
The terminal receipt is valid only from client to gateway with an exact
zero-byte payload. Session-state authorization remains a gateway responsibility;
the Protocol grammar defines only its fixed wire shape.
The gateway-to-client types are `0x10` host termination (`exit_code` u32),
`0x11` rumble (`controller` u8, `low_frequency` u16,
`high_frequency` u16), and `0x12` HDR mode (`enabled` exactly `0` or `1`). The