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:
1 parent
59dff06f1c
commit
4e1e6a9d5c
4 files changed
+16
-5
No files matched your search
@@ -38,7 +38,9 @@ def test_listing_maps_each_header_into_the_shared_shape():
|
||||
assert (out.serial, out.series, len(out.events)) == ("BE18193", 3, 2)
|
||||
e = out.events[1]
|
||||
assert e.event_id == "BE18193:0111245a:20261002093015"
|
||||
assert (e.index, e.timestamp, e.record_type) == (1, "2026-10-02T09:30:15", "histogram")
|
||||
assert (e.index, e.timestamp) == (1, "2026-10-02T09:30:15")
|
||||
# The 0C record does not say waveform or histogram (every layout reads "Waveform").
|
||||
assert e.record_type is None and "not decoded yet" in e.detail["record_type_note"]
|
||||
assert e.peaks_ips == {"tran": 0.05, "vert": 0.08, "long": 0.03}
|
||||
assert e.peak_vector_sum_ips == 0.12 and e.detail["mic_psi"] == 0.0001
|
||||
assert e.filename and e.filename.startswith("T193")
|
||||
|
||||
Reference in new issue
Block a user