Expand description
Verify-by-reread orchestration, I/O-free.
VerifySession is the brain of send_and_verify, extracted from the MQTT
client so it can be tested without a network: you publish a command, then feed
it the printer’s report messages one at a time via VerifySession::observe;
it returns a CommandOutcome the moment it can conclude, and
VerifySession::timed_out gives the verdict when no conclusive message
arrives in time. The real client is a thin async shell around this; tests
drive it with a [crate::core::fake::FakePrinter] message sequence.
The order of operations matters and is the reason this is per-message:
- the ACK (echoed
sequence_id+result/reasonunder the command’s category) must be matched as its message merges, before a laterpush_statusoverwrites that category’ssequence_idwith the printer’s own counter (the two-kinds-of-sequence_idhazard); - the
print_errorbaseline is captured from the first full snapshot so only a new fault is blamed on the command.
Structs§
- Verify
Session - Drives verify-by-reread for one command over a stream of report messages.
Enums§
- Command
Outcome - The result of verifying a control command.
- Verify
Stage - Which stage of verification failed to confirm a command.