flaws_baseline.json 923 B

123456789101112131415161718192021
  1. {
  2. "flaw_1_explain_crc_bypass": {
  3. "bad_get_ack_hex": "a55a8200f561",
  4. "crc_ok": false,
  5. "summary": "单板确认已受理 GET_ALL 查询请求,随后立即发送 GET_DATA",
  6. "issue": "explain() returns a dict with crc_ok=False but callers like serial_read_loop did not check crc_ok"
  7. },
  8. "flaw_2_bad_set_ack_false_success": {
  9. "bad_set_ack_hex": "a55a8100a634",
  10. "type_byte": "0x81",
  11. "issue": "serial_read_loop directly matched byte 2 == 0x81 without CRC check, announcing success on invalid frames"
  12. },
  13. "flaw_3_trailing_a5_dropped": {
  14. "initial_buf": "1234a5",
  15. "post_clear_buf": "",
  16. "issue": "rx_buf.clear() dropped trailing 0xA5 at chunk boundary, causing subsequent 0x5A to not match"
  17. },
  18. "flaw_4_no_rx_raw_logging": {
  19. "issue": "serial_read_loop had no logging for raw bytes received via sp.read(); any non-frame data or framing errors were completely silent in UI"
  20. }
  21. }