4 Commits
Author SHA1 Message Date
serversdownandClaude Opus 5.5 f34f5c3376 test(minimateplus): pin the BE9441 bodies and files byte for byte, and the TERM's header skip
Re-review of 64273c0: nothing pinned the TERM skip -- a TERM cut one byte off
loses a byte after the END record, invisible to every decode and peak check.
Golden sha256 of both fixtures' bodies and written files (event 0's file is
byte-identical to the one SFM stored at the bench before any fix; event 1's is
the bench's 25,810 bytes plus the 2 recovered), and a TERM moved to 0x1002.
The clipped-blast test now sits two steps past full scale (32032 counts), so it
needs the carve-out.  Spec: the TOOL_VERSION reason corrected (no stored file
is affected); a MicL-only waveform is now refused -- failing safe, bench-check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
2026-10-25 19:01:36 -04:00
serversdownandClaude Opus 5.5 c32a9e7851 fix(sfm): a MiniMate download that decodes as nothing is refused, not stored as a histogram
Review of 36f4e5d (measured): with the metadata-page bug put back, 4 of 7
BE12599 non-first waveforms decoded to nothing, and the check stored them
unverified as 'a histogram' -- the worst form of the bug it was built for.
Now: no waveform decode must decode as a histogram (stored unverified) or it is
refused; a waveform's record chain must end on its END record (0x06), as the
file reader requires -- cut-short streams have none; the structure checks run
for every unit and only the peak comparison is limited to a unit confirmed in
normal range (geo_range == 0; an unread range is no longer assumed normal);
a clipped blast at full scale on both sides counts as a match.  Tests pin the
one-step tolerance, both ranges, the END record and the neither case.

No DB or schema change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
2026-10-25 18:47:39 -04:00
serversdownandClaude Opus 5.5 ac34f80daa fix(minimateplus): every A5 header is 12 bytes once inner DLE pairs count as one -- the general rule
Review of 352f694: the metadata-page detection fixed every observed stream but
was one case of a general rule.  An A5 header is 12 bytes in the stripped sense
(TERM's 11); its raw length is 13 whenever the echoed address carries an inner
DLE pair -- the metadata pages at 0x1002 / 0x1004, but equally a sample chunk
or TERM boundary that lands there (inferred: ~1 in 128 events spanning
0x1000-0x1200, not in any capture).  _raw_skip() counts it per frame, the way
probe_skip already did; _has_metadata_pages is gone.  The reviewer measured
the rule reproducing the shipped bodies byte for byte on all 26 current-walk
streams on this box.  Test: a chunk moved to 0x1002 yields the same body.

No DB or schema change; TOOL_VERSION not bumped (the file builder changed, the
.h5 decode did not).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
2026-10-25 18:45:44 -04:00
serversdownandClaude Opus 5.5 36f4e5d985 feat(sfm): a MiniMate download is checked against the unit's own peaks before it is stored
Series 4 downloads were checked (decoded PVS against the unit's); Series 3's
were stored unchecked (verified=None), so BE9441's two bad files went in as
successes at the bench (2026-10-25).  verify_s3_download(): if the waveform
decodes, all three geophone channels must be the same length and each peak must
be the unit's own 0C peak to one 0.005 in/s step, or the download is refused
(MalformedReply, "not saved").  Unverified (stored, as before): no waveform
decode -- a histogram; 0 of ~430 fixture histograms decode as one -- or a
sensitive-range unit, whose scale is still open.  The reason goes in
detail["check"].

A test puts the metadata-page bug back and the check refuses the file it
produced.  Session-replay helpers move to tests/minimate_replay.py.

No codec, store or DB change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
2026-10-25 18:14:44 -04:00