preserve BLE reconnect validation evidence
This commit is contained in:
Vendored
+9
@@ -54,6 +54,15 @@ removed before production firmware was built and flashed.
|
||||
validated file above. Its 3,589 skipped startup bytes and one candidate-header
|
||||
rejection are deterministic, and extracting its 151 valid frames reproduces
|
||||
`direct_usb_73e5680.trk` byte-for-byte.
|
||||
- `ble_reconnect_483ace3.trk` — SHA-256
|
||||
`c4a0d795cdf9d490acaca0144c3ad33f85bbfb2214d3f7abdfe515c4e5f25398`.
|
||||
This is the resumed half of a real macOS receiver interruption against exact
|
||||
firmware commit `483ace3`. It contains 2,576 contiguous samples, sequences
|
||||
1,992 through 4,567, with zero packet/sample gaps, resets, CRC failures,
|
||||
reported drops, loop overruns, trailing bytes, or timestamp saturation. The
|
||||
final status records one disconnect and one deliberate frame replay, with
|
||||
zero notification failures or invalid ACKs. It validates that the 10.24-second
|
||||
queue covered the measured resubscription interval without permanent loss.
|
||||
|
||||
`tests/test_trikke_protocol.py` verifies the hashes, parses the captures in
|
||||
fragmented chunks, and asserts these signatures so the hardware evidence remains
|
||||
|
||||
BIN
Binary file not shown.
@@ -291,6 +291,24 @@ class ProtocolContractTest(unittest.TestCase):
|
||||
"timing_anomalies": 2,
|
||||
"gaps": [],
|
||||
},
|
||||
"ble_reconnect_483ace3.trk": {
|
||||
"sha256": "c4a0d795cdf9d490acaca0144c3ad33f85bbfb2214d3f7abdfe515c4e5f25398",
|
||||
"sample_count": 2576,
|
||||
"first_sequence": 1992,
|
||||
"last_sequence": 4567,
|
||||
"max_dropped": 0,
|
||||
"timing_anomalies": 1293,
|
||||
"gaps": [],
|
||||
"final_status": {
|
||||
"sensor_read_failure_count": 0,
|
||||
"queue_overflow_count": 0,
|
||||
"transport_begin_retry_count": 187,
|
||||
"transport_disconnect_count": 1,
|
||||
"transport_send_failure_count": 0,
|
||||
"transport_replay_count": 1,
|
||||
"transport_invalid_ack_count": 0,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for name, contract in expected.items():
|
||||
@@ -348,6 +366,13 @@ class ProtocolContractTest(unittest.TestCase):
|
||||
integrity.final_dropped_sample_count,
|
||||
)
|
||||
self.assertEqual(0, integrity.final_loop_overrun_count)
|
||||
if "final_status" in contract:
|
||||
self.assertIsNotNone(integrity.final_status)
|
||||
for field, value in contract["final_status"].items():
|
||||
self.assertEqual(
|
||||
value,
|
||||
getattr(integrity.final_status, field),
|
||||
)
|
||||
|
||||
gaps = [
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user