fix(minimateplus): a one-event download names an event that crosses the 64 KB page boundary

Bench re-run 2026-10-26: BE9441 events 2 (0111c92c) and 19 (0118a4ca) end in
the next page, so STRT's 16-bit end offset reads lower than the start.  The walk
then failed in bulk_waveform_term_v2 with a ValueError ('end_offset 0x2F06 must
be > last_chunk_counter 0xC92C') that the adapter's struct.error mapping did not
catch: a generic 500.  Strict mode now refuses such an event by name right
after the probe -- 'crosses the unit's 64 KB page boundary ... the known 5A
page bug; not saved' -- before any chunk is sent.  Not stored either way.  The
page bug itself is unchanged (CLAUDE.md: needs a BW capture of a spanning event).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-10-26 01:16:12 -04:00
1 parent d56dde768d
commit bf9e32cfc0
2 files changed
+24

No files matched your search

+10
View File
@@ -664,6 +664,16 @@ class MiniMateProtocol:
raise ProtocolError(
f"5A probe for {key4.hex()} carried no STRT record, so the event's end "
"is unknown -- not downloaded")
if strict and end_offset is not None and end_offset < start_offset:
# The known 5A page bug: parse_strt_end_offset keeps only the low 16
# bits, so an event that ends in the next 64 KB page reads as ending
# before it starts, and the walk cannot follow it yet. BE9441's
# events 2 and 19 (bench 2026-10-26) -- named here, before any chunk.
raise ProtocolError(
f"event {key4.hex()} crosses the unit's 64 KB page boundary (starts at "
f"0x{start_offset:04X} in page 0x{key4[1]:02X}, ends at 0x{end_offset:04X} in "
"the next) -- SFM cannot download such an event yet (the known 5A page bug); "
"not saved")
if end_offset is None:
log.warning(
"5A probe response did not contain a STRT record; "