Clevertuna

Safety, and what "verified" means

"Verified" means verified

A command that returned zero is not proof that anything happened. Every write walks the same ladder, and each rung is reportable:

validated → sent → acknowledged → read back → compared → verified

Acknowledged only means the keyboard liked the request. Verified means Clevertuna asked again afterwards and the answer matched what you asked for. If it does not match, that is a mismatch — a first-class result with expected and actual values, not a success with a shrug.

ExitMeaning
0read completed, or write verified
2usage or validation error
3no device found
4transport or protocol failure
5write accepted but readback differs
6backup file rejected

Comparison is deliberately limited to what your scheme actually named. The keyboard fills in fields you left out, and reporting those as a mismatch would be noise.

Safety

Device behaviours that will cost you an afternoon

Three things the firmware does that look like bugs in your client:

The full wire format is in PROTOCOL.md.