Firmware review

Read the requested diff, its nearby callers and the applicable requirements. Keep the review within that task. Inspect timing arithmetic and rollover, invalid/stale/recovery paths, command and buffer bounds, integer conversions, and whether tests distinguish the required boundaries. Use the actual shared source; mocks cannot establish physical timing or electrical behavior.

Report actionable findings in order of impact, each with file/line, concrete trigger, observed or predicted consequence, and a minimal test or source reference. Distinguish executed evidence from a hypothesis. If no actionable issue is supported, say so and list only material verification gaps. Do not manufacture findings to fill a format or rewrite a clean diff.

Use scripts/test.cmd and scripts/build-firmware.cmd from the repository root when execution is available and within the task; record command exits and source identity. The host appendix uses python3 scripts/native.py test. A compile does not establish upload, serial behavior, accuracy or bench verification. Reviewing does not by itself authorize flashing, physical operations or remote publication.