fix: bench follow-ups -- the setup-menu warning, observed call-home values, waveform read
From the 2026-11-04 bench: - A MiniMate settings preview warns that a change is lost if someone is in the unit's setup menu: a write sent with the menu open was acknowledged and read back, then lost on Cancel or Save -- the menu writes its own copy of the whole block back (measured both ways on BE9441). - The two bytes after the MiniMate settings block went out as 00 00 and the unit took them; the preview note says so instead of 'unmeasured'. - A Micromate call-home plan no longer warns about 0x00 / 0x01: UM20147 took both, each way, on 11-03 and 11-04, matching its menu. - read_waveform_data_raw drops the escaped-checksum's stray 0x10, as the settings read does (it failed closed: the write's block check refused 203 bytes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
1 parent
55c7b7b5ae
commit
c790e20116
6 files changed
+68
-10
No files matched your search
@@ -121,3 +121,31 @@ def test_a_leftover_that_is_not_the_stray_escape_is_not_trimmed():
|
||||
sfm_read = READS[8]
|
||||
odd = [sfm_read[0] + b"\x55", sfm_read[1], sfm_read[2]]
|
||||
assert not is_compliance_content(assemble_compliance_content(odd, lengths=(1024, 1024, 42)))
|
||||
|
||||
|
||||
# The same artifact on the waveform-data read a settings write echoes back: it asks
|
||||
# for 0xCA = 202 bytes; one extra trailing 0x10 is the escaped checksum's DLE.
|
||||
# (Unfixed, it fails closed: the write's own block check refuses 203 bytes.)
|
||||
class _Replies:
|
||||
def __init__(self, data):
|
||||
self._data = data
|
||||
self.sent = []
|
||||
|
||||
def __call__(self, frame):
|
||||
self.sent.append(frame)
|
||||
|
||||
|
||||
def _waveform_proto(data_reply: bytes):
|
||||
from types import SimpleNamespace
|
||||
p = mp.MiniMateProtocol(object())
|
||||
p._send = _Replies(None)
|
||||
replies = [SimpleNamespace(data=bytes(11)), SimpleNamespace(data=bytes(11) + data_reply)]
|
||||
p._recv_one = lambda expected_sub=None, **kw: replies.pop(0)
|
||||
return p
|
||||
|
||||
|
||||
def test_the_waveform_read_drops_an_escaped_checksums_stray_byte():
|
||||
block = (200).to_bytes(2, "big") + bytes(range(198)) + b"\x17\x17" # N = 200, plus its 2 tail bytes
|
||||
assert _waveform_proto(block).read_waveform_data_raw() == block
|
||||
assert _waveform_proto(block + b"\x10").read_waveform_data_raw() == block
|
||||
assert _waveform_proto(block + b"\x55").read_waveform_data_raw() == block + b"\x55" # anything else is kept
|
||||
Reference in new issue
Block a user