fix(sfm): Series-3 events list with no record type, not a wrong one

minimateplus's _extract_record_type returns "Waveform" for every 0C
record layout -- it cannot tell a histogram -- so a MiniMate histogram
was listed as "waveform".  The fake's "Histogram" was a value the real
client never produces, which is why no test saw it.

- _s3_ref: record_type is always None, with
  detail.record_type_note = "Series 3's event record does not say
  waveform or histogram; not decoded yet".
- default_s3_events(): both events "Waveform", as the real client gives.
- The shared-shape contract test allows exactly {"record_type"} to be
  None for Series 3 and nothing for Series 4.

Rows SFM stores for Series 3 still carry "Waveform" from the decode (the
same as the legacy blastware_file route); parked in the spec.  No codec,
store or DB change.

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-21 17:40:26 -04:00
1 parent 59dff06f1c
commit 4e1e6a9d5c
4 files changed
+16 -5

No files matched your search

+3 -1
View File
@@ -34,11 +34,13 @@ def test_both_series_list_events_in_the_same_shape():
def test_no_shared_field_is_empty_for_either_series():
# A field one series cannot fill belongs under `detail`, not at the top level.
# Except Series 3's record_type: its 0C cannot tell a histogram yet, and null beats a wrong type.
allowed = {3: {"record_type"}, 4: set()}
for out in (access(s3=[FakeMiniMateClient()]).list_events(ADDR, "BE18193"),
access(s4=[FakeMicromateClient()]).list_events(ADDR, "UM20147")):
for e in out.events:
empty = {k for k, v in dataclasses.asdict(e).items() if v is None}
assert empty == set(), (out.series, empty)
assert empty == allowed[out.series], (out.series, empty)
def test_a_micromate_list_and_download_share_one_held_line():