Repository navigation
Conversation
…on in each TcpStream
…rd write confirmation
| .board(definition.board) | ||
| .ok_or(SendError::NoClient(definition.board))?; | ||
|
|
||
| handle.send(order).await |
There was a problem hiding this comment.
In the case that you try to send an order to a board that isn't connected, this board isn't maped in Handles (edit: now BoardClients), so the method board returns an error which is transformed with .ok_or() to a SendError::NoClient.
Makes sense?
| /// Returns the configured boards whose write completion was not confirmed | ||
| /// (offline, session ended, I/O failure, or deadline elapsed). A failed/partial write is never | ||
| /// retried and ends that session. Failure does not prove no bytes were delivered. | ||
| pub async fn propagate_fault(&self) -> Result<(), Unreachable> { |
There was a problem hiding this comment.
This function does not propagate fault, just sends it, please consider rename it
There was a problem hiding this comment.
I fo not understand this function, claude states that can be simplified usign future::join_all.
| ### Reporting, framing and cancellation | ||
|
|
||
| TCP accumulates partial input and extracts complete ADJ-dependent frames. An | ||
| undecodable suffix waits for more bytes until it exceeds the 374-byte framing |
There was a problem hiding this comment.
This checks if the packet that arrives is one defined by us. If firmware or us fail to encode correctly a packet making it larger than 374 bytes, which has to be processed by this, pops an error.
There was a problem hiding this comment.
If the function declared in the module protocol which decodes, if fails to decode a packet with a length of 374 bytes, this means that is not well encoded or is not defined.
| /// | ||
| /// Starting a nonempty configuration outside a Tokio runtime panics, as does | ||
| /// [`tokio::spawn`]. | ||
| pub fn spawn(config: Config, adj: Arc<Index>, reporter: Reporter) -> Handles { |
There was a problem hiding this comment.
Do not call index as adj
GaziH
left a comment
There was a problem hiding this comment.
looks great overall, waiting on Javier's requested changes to be implemented.
… name to "Handles", etc...)
Summary
Validation
Automated tests and local loopback checks pass, but end-to-end validation against board firmware is still pending.
Please review
propagate_fault()carefully, particularly whether its behavior matches the firmware's expectations. Its current success result confirms only the TCP write, not firmware receipt or execution.Pending