Release v0.34.0 — Series-4 parity, and most of Blastware's report from the event file alone #59

Merged
serversdown merged 245 commits from dev into main 2026-11-04 18:19:24 -05:00
2 changed files with 15 additions and 0 deletions
Showing only changes of commit a130107fdf - Show all commits

No files matched your search

+4
View File
@@ -282,6 +282,10 @@ def s4_download_event(client: Any, serial: str, key: bytes, stamp: Optional[str]
if ref.key != key:
continue
found = stamp_of(ref.timestamp)
if stamp is not None and found is None:
raise MalformedReply(
f"could not read event {key.hex()}'s record (0C) timestamp to confirm it "
"is the one listed -- not downloaded; try again")
if stamp is not None and found != stamp:
raise StaleEvent(
f"the event at {key.hex()} on {serial} is from {found}, not {stamp} -- "
+11
View File
@@ -69,3 +69,14 @@ def test_a_stale_id_is_refused_and_nothing_is_downloaded():
def test_a_key_that_is_not_stored_is_404():
with pytest.raises(EventNotFound):
s4_download_event(FakeMicromateClient(), "UM20147", bytes.fromhex("deadbeef"), None)
def test_a_record_whose_timestamp_did_not_decode_is_not_called_stale():
# Mirrors Series 3 (F3): an unreadable 0C timestamp is a comms/decode fault,
# not proof the unit was erased -- and nothing is downloaded.
from sfm.device_access.errors import MalformedReply
fake = FakeMicromateClient()
fake.event_refs[0].timestamp = None
with pytest.raises(MalformedReply, match="0C"):
s4_download_event(fake, "UM20147", W_KEY, "20250531135901")
assert fake.fetched == []