diff --git a/tests/fixtures/README.md b/tests/fixtures/README.md index 603cfb2..8ec6bb3 100644 --- a/tests/fixtures/README.md +++ b/tests/fixtures/README.md @@ -68,6 +68,16 @@ removed before production firmware was built and flashed. maximum; cumulative error is 152 us over 25.75 seconds. This records bounded BLE scheduling jitter without rate drift and requires timestamp-derived `dt` in future fusion work. +- `ble_mtu_race_4bf00eb.trk` — SHA-256 + `4a231b54a3c7320fd69cac869b830e94aca8f704f946881b9cdfd21991bfa41f`. + This exact-commit stress capture followed six rapid subscribe, first-fragment, + and disconnect cycles aimed at the MTU lookup race. Telemetry remained live + afterward: the capture contains 1,848 CRC-valid samples with zero packet gaps, + resets, send failures, or invalid ACKs, while status records exactly six + disconnects and six replays. The test deliberately withheld application ACKs + beyond the 10.24-second queue window, so sequences 1,024 through 4,021 were + intentionally lost; the single 2,998-sample gap, matching queue-overflow total, + demonstrates bounded buffer exhaustion rather than a suspended output task. `tests/test_trikke_protocol.py` verifies the hashes, parses the captures in fragmented chunks, and asserts these signatures so the hardware evidence remains diff --git a/tests/fixtures/ble_mtu_race_4bf00eb.trk b/tests/fixtures/ble_mtu_race_4bf00eb.trk new file mode 100644 index 0000000..b74bad9 Binary files /dev/null and b/tests/fixtures/ble_mtu_race_4bf00eb.trk differ diff --git a/tests/test_trikke_protocol.py b/tests/test_trikke_protocol.py index cd0fbe7..d27cd6e 100644 --- a/tests/test_trikke_protocol.py +++ b/tests/test_trikke_protocol.py @@ -309,6 +309,24 @@ class ProtocolContractTest(unittest.TestCase): "transport_invalid_ack_count": 0, }, }, + "ble_mtu_race_4bf00eb.trk": { + "sha256": "4a231b54a3c7320fd69cac869b830e94aca8f704f946881b9cdfd21991bfa41f", + "sample_count": 1848, + "first_sequence": 0, + "last_sequence": 4845, + "max_dropped": 2998, + "timing_anomalies": 412, + "gaps": [(1023, 4022, 29_990_016)], + "final_status": { + "sensor_read_failure_count": 0, + "queue_overflow_count": 2998, + "transport_begin_retry_count": 2471, + "transport_disconnect_count": 6, + "transport_send_failure_count": 0, + "transport_replay_count": 6, + "transport_invalid_ack_count": 0, + }, + }, } for name, contract in expected.items():