Brings the branch up to dev (41 commits) before the 1c bench fixes, which
touch code dev changed: the histogram reader (#47/#49, bench finding #2), the
v0.32.0 event-time rules, the Blastware file's setup-block fields (#44/#45),
and the decode checker for verifying stored S3 downloads.
One conflict: the top of the Series-III reference's change table -- both sides
added rows; kept all, in date order, CRLF preserved. CLAUDE.md, README,
blastware_file.py, models.py and database.py merged cleanly. Suite: the known
16 failures only (15 test_bw_ascii_report, test_save_imported_bw_without_report_
works_unchanged, which also fails on dev); 1237 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
- A matching event that now fails outright is a regression: compare_runs
walks the previous run's matching rows, so a check that collapses to
one error row no longer hides every field it used to match. Counts
moved are taken over the events both runs checked.
- The default baseline is the newest completed run (run.json written) of
the same scope; a 2,000-event sample is no baseline for a full run.
changes.md names the previous run's scope.
- The PVS saturation carve-out now needs Blastware's OORANGE, a channel
Blastware clamped at SFM's ceiling, and SFM's sum within three channels
at the ceiling -- an unclipped Sensitive-range channel read 8x can no
longer let an 8x sum through.
- 'Fields fully matching' needs a match: an always-empty element proves
nothing. Events without a report are a line of their own.
- CLAUDE.md: histogram PVS described correctly; 35 sub-minute histograms
plus 2 one-minute no-mic ones, not '~37 sub-minute'.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
Each run is diffed against the previous one (--compare-to, or the newest
other run in ~/dl2-archive/checker-runs): changes.md lists every
(event, field) that matched before and no longer does, how many now
match, and how each field's counts moved; summary.md leads with the
regression count. --file NAME checks one event and prints its table,
writing no run folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
summary.md for Brian: per field, events per verdict, how many fields
fully match, non-matches by event year, carve-out counts. details.json
for Claude: each non-matching (field, verdict) with the attribute values
its failures concentrate in (>= 10% of the failures; concentrated at
>= 95% of compared events) and example events, each with a one-event
re-run command. On a 2,000-event sample the event-type mismatches group
as 'type = Full Histogram, 1815/1815' -- #41, named by the report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
check_s3_decode.py pairs each Series 3 event file with its _XML.XML
report (deduped by basename -- Sent/ mirrors the root), checks each in a
process pool, and writes results.jsonl.gz and run.json to a run folder
outside the repo. A missing report or any failure is one row for that
event; the run goes on. Partial runs by serial, year, type, field
prefix or random sample.
Timing: --sample 2000 --jobs 4 took 35 s on tmi-dev (~20 min projected
for all 70,042).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
A mismatch becomes 'accepted' only through a written carve-out whose
evidence does not rest on SFM's output. Saturation: Blastware clamps a
clipped channel to the range maximum and prints OORANGE, while the file
holds counts past full scale. SFM's value must sit at the ceiling
(r - 0.0006 .. r * 1.01), so a Sensitive-range event read 8x high on
SFM's Normal assumption stays a mismatch; a vector sum is accepted when
a clipped channel under it is at the ceiling. series_pairs() is now the
one place waveform rows and interval columns are paired.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
Every field the report carries (bar its format version and Blastware's
file name), the notes in order, the job number, the channel list, every
waveform sample and every histogram interval column. Numbers match at
Blastware's printed precision, halves rounding away from zero; N/A and
empty text are no_reference; >100 needs SFM's above-range flag; OORANGE
is a mismatch unless a carve-out says otherwise. Waveform rows pair
cells with the channels still running, so channels that end early
(T438HGTZ.B30W) match, and any row-length disagreement is counted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
decode_blastware_bytes with no filename and no report: the values SFM
produces today in Blastware's field names, its notes, channels and raw
counts, with its Normal-range assumption kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
The reference for the Series 3 decode checker: scalars and value units,
channels, the job number, the user notes in order under their
operator-edited labels, waveform rows as printed (ragged where channels
end at different lengths) and histogram intervals. Seven real DL2
events as fixtures, each covering a case the comparison must handle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
Without a paired ASCII report, a Blastware import stored no sample rate,
the record-type byte as its record time (every waveform read "70 s"), a
pre-trigger and sample count read from STRT bytes that are neither, and
blank notes (the reader stopped at the NUL after each label).
- The recording-setup block is found by structure -- 1c 08, the setup
name, NUL -- not by the name "Standard Recording Setup", which 37% of
DL2's files do not use. One match in each of 70,041 archive files.
- Sample rate (uint16 BE, name-42), pre-trigger (f32 BE, name-36) and
record time (f32 BE, name-30). A waveform's sample count is the
decoded count. A histogram gets a sample rate only: Blastware reports
neither a record time nor a pre-trigger for one.
- The setup name and the four user notes by position, as bw_ascii_report
reads them: the labels are operator-editable ("Seis. Loc:",
"Location:", "Project: ").
- STRT now yields only the waveform key.
Verified against Blastware's own _XML.XML event reports for the 70,042
DL2 archive events that have one (2016-2026): sample rate 70,042/70,042,
record time 6,524/6,524, pre-trigger 6,484/6,484, notes 70,042/70,042,
sample count 6,523/6,524 (one waveform the decoder ends 3 samples short;
separate). Events imported with an ASCII report are unchanged -- the
report still overlays.
Not changed: the waveform-time estimate still finds the record time by
the marker; moving it would add a validation constraint for 37% of files
and is to be measured first. The job number is not read yet (2,997
archive events carry one).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
GET /device/monitor/status?serial=UM...&run_state=true adds
detail.run_state = {code, name}. For the ring-path bench test: the code
during and after a call-home (0x01 for ~18 s after a stop, inferred to be
call-home attempts; 0x03 = calling home) is what the test watches. Opt-in
because it is one more round trip (~0.65 s on cellular); a plain status read
is unchanged. Series 3 has no 0x49 and ignores it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
- The arrow keys reached the legacy per-index waveform route in serial mode,
even with no list loaded (an unlocked MiniMate chain walk + 5A on the same
modem session). perIndexLive() is now the one rule for the per-index
buttons, the chips and the keyboard: live only for a list loaded without a
serial that has events.
- A failed reconnect left the previous unit's confirmation live (badge,
Diagnostics incl. the unguarded blind/slow-drip stops, call-home read).
connectUnit() now drops it before it identifies; only this answer confirms.
- Unit strings reached innerHTML: the Device tab's cards (active_setup, new in
1c) and its compliance/project tables now render as text, and Diagnostics'
error spans go through escapeHtml().
- CLAUDE.md: the ring-path Runs A/B are a merge gate (the spec's prerequisite
to a webapp sending serial), not only a use-time one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
- Config, with a serial: Read shows the unit's shared UnitSettings (setup,
record mode, sample rate, record time, histogram interval, geo trigger,
notes; — for null) in place of the write form. settingsRows() is in the
device-routing block, Node-tested; the rows are rendered as text, since
setup names and notes come from the unit.
- Write stays off for both series (and without a serial), tooltip
"Coming in phase 5 (#46)"; Call Home write likewise, "Coming in phase 4".
- Call Home read follows controlsFor().callHomeRead; for a confirmed Series 4
the tab says "Not yet available for Series 4".
- Diagnostics: every button follows controlsFor().diagnostics (Task 3), and a
refresh for anything but a confirmed Series-3 unit sends nothing and says
why. Its requests carry the typed serial, so the server guard checks it.
- Without a serial the legacy reads are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
- Load events with a serial lists the shared EventRef shape as a table: index,
time, type, PVS and the three peaks (or —), each row with its own Download.
- Download POSTs the row's event_id; SFM checks and stores it. The status bar
says what was stored (or that it already was), and the stored event opens
in the viewer. A refusal shows the server's detail verbatim.
- eventView() (device-routing block, Node-tested) reads both event shapes for
the table, the chips and the peaks bar.
- A list loaded without a serial keeps the chips and the per-index Load /
Save / Download buttons, unchanged; for a serial-loaded list those buttons
are off with a tooltip pointing at the rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
- A Serial field beside host/port. With one, the Live tabs use the serial-based
endpoints (both series); without, every read behaves as before.
- The series badge, Hang up (Series 4), Diagnostics (Series 3), call-home read and
the disabled config/call-home writes all follow applyControls() <- controlsFor()
on the unit's own /device/info answer; editing the serial, host or port drops
the confirmation. Erase additionally needs a confirmed Series 3.
- Every /device/ request goes through deviceRequest/deviceFetch <- deviceUrl
(a static test enforces it); the legacy per-event routes joined deviceUrl
(event_waveform / event_file, index in the path).
- The status panel and Device tab read both shapes (shared and legacy).
- In serial mode the connect skips the legacy storage_range read (one connection
fewer; a Micromate has no such route). Start/stop without a serial behave as
before; with one, only for a confirmed series.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
One block of sfm_webapp.html (/* <device-routing> */) holds every rule that
decides where a /device/ request goes or whether a series-specific control is
live: seriesFromSerial, unitQuery, deviceUrl, confirmedSeries, controlsFor,
changeSummary, downloadSummary. No DOM, no fetch, so the tests run it in Node.
The safety rules it pins: a control follows the unit's own /device/info answer,
never a typed serial alone, and stops counting when the serial is edited;
Diagnostics only for a confirmed Series 3, Hang up only for Series 4; config and
call-home writes off for both series until phases 4-5. Also a test that the
page's inline scripts parse together (shared global scope).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
0xA2 is CONFIRM ERASE on a MiniMate and ends a call-home on a Micromate, and the
legacy host/port routes had no identity check: only the MiniMate parser's
inability to read a Micromate's replies stood between Diagnostics' Erase and a
Micromate (phase 1c safeguard, agreed with Brian 2026-10-28).
_require_series3(unit_serial, expected) refuses (409, 'nothing sent') unless the
unit's own serial is Series 3 and, when ?serial= names one, that one:
- POST /device/config (+ /config/project) and /device/events/erase: the serial
connect() already reads -- no extra request;
- /device/rescue (when it writes call-home or erases) and POST /device/call_home:
one SUB 0x15 read (new MiniMateClient.read_serial).
Exempt, with the reason in a comment: legacy monitor start/stop, blind stop, slow
drip, spam -- 0x96/0x97 mean the same on both series (measured), and the rescue
tools must reach a unit too wedged to answer.
Tests: each guarded route refuses a unit answering UM20147 and a different BE
unit with no write call, proceeds for the named unit (normalised), reuses
connect()'s serial where it has one; the blind stop builds no client;
read_serial decodes BE9441's recorded 0x15 reply.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Review of b5037b0 (measured on 12 recorded SFM compliance reads): the read
keeps three escape bytes from its reply headers, so every real config image is
refused by write_image -- correctly, but only after 68 and 73 had been sent,
with a message saying nothing was. All four blocks are now checked first; the
test feeds the block exactly as SFM's read produces it and asserts no frame is
sent (two went out without the check).
Config push stays unusable on purpose: fixing that read alone would let the
compliance encoder write some fields to the wrong bytes (e.g. 4,096 sps as
4,112) while the image still passes. The rework -- logical read, encoding at
measured offsets with #48, a diff check, N pinned per SUB, an idle check, the
start/stop safeguards on POST /device/config -- is recorded in the spec and on
#46. Start/stop frames are unchanged (verified byte-identical by the review).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Measured against every Blastware request on record: the uploaded Feb-Apr 2026
captures (3,869 frames, 3,869 re-encode exactly) and BE9441's two sends on
2026-10-26 (26 write frames). A write is the standard 16-byte request plus its
data, every 02/03/04/10 escaped, SUM8 checksum; the length field is the data's
length. A config block starts with its own length N and is written as N + 2
bytes: event index (68) and trigger (82) as read plus 02 00 / 00 00 (constant on
15 sends), waveform data (69) and the 2,092-byte compliance image (71) whole.
The compliance image goes in addressed chunks (params[2:4] = address): 512 bytes
tonight (Blastware 10.74), 1,024 in March.
- framing.build_bw_write_frame: uniform escaping, SUM8, length = len(data).
RETRACTED: 'only BW_CMD doubled', the 'DLE-aware checksum', 'offset = data[1]
+ 2' -- fitted to frames still holding their escape bytes ('data 91, offset 90'
was 90 bytes and one escape). It got 7 of every 13 frames in a write wrong.
- protocol.write_image(): unescapes (callers may pass the parser's form), adds
the trailing two bytes to an N-byte block, and REFUSES anything else before a
byte is sent -- an edit beside a kept escape byte (the old encoder's anc-9
hazard) leaves an image one byte long.
- write_compliance_config_raw: 512-byte addressed chunks, then confirm 72.
- read_event_index / read_waveform_data_raw unescape before slicing (a block
holding 02/03/04/10 came out short); new read_trigger_config (SUB 0x2E).
- apply_config reads the unit's trigger block. RETRACTED: the block
'hardcoded from 3-11-26 -- no read exists'. Blastware reads it; byte 5 has
been 01 / 03 / 04 by unit and session, and the March copy (03) would have
changed BE9441's (01).
- The call-home write (7E) goes through write_image: its 127-byte 'read + 00 00'
is the 126-byte image (N = 0x7C). No Blastware 7E is on record here -- that
one is inferred from the other 77 write frames.
Tests: tonight's 26 and every Feb-Apr write frame rebuilt byte for byte; each
block as read written exactly as Blastware wrote it; the parser's form; the
stray-byte refusal; the reads against the unit's recorded replies; apply_config
writes BE9441's own trigger block. Six mutants, each caught. The old
test_write_frames.py (25 tests that had been skipping) runs now that the
captures are here, rewritten to the measured model.
Not yet sent to a unit: a config push changes settings, so its first live use
is a bench session with Brian. No codec, store or DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Brian: keep an event whose time is only an estimate (no validated embedded
event record) -- never discard a measurement for want of an exact timestamp --
but it must not silently cause an overwrite, merge or dedup collision.
insert_events, for timestamp_source 'estimate' (_estimate_guard):
- never restamps (moves) a row;
- if its file (a Blastware name) is already stored under another time, writes
nothing -- no second row, the stored time kept;
- if a different event already holds that second, writes nothing -- the old
upsert would have written this event over that one;
- otherwise stores it, or refreshes its own row at the same second, as before.
Each refusal is a WARNING naming both sides; the file and sidecar (which says
'estimate' and carries the decode problem) are already in the store. A generic
upload name ('imported.bw') is not taken as identity.
Tests: each rule, an estimate on a free second kept, generic names, and an
import end to end (a corrupted record next to a different event's second).
3 mutants, each caught. Suite vs clean origin/dev: the same 16 failing tests,
failure reasons byte-identical; 582 passed vs 553.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL
Second start through SFM, BE9441 2026-10-26 23:54:41: acked 0x69, and Brian saw
'starting, performing sensor check, recording' -- but the read-back's single
SESSION_RESET + POLL went out 2.3 s after the ack, inside the ~30 s sensor
check, and was never answered or re-sent (504 after 120 s, audit ca7b5b42).
Brian: every unit is set to sensor-check before monitoring, ~30 s, then
'Recording...'.
- MiniMateProtocol.wake(attempt_s, deadline_s): SESSION_RESET + POLL re-sent
every attempt_s until the unit answers, then the POLL data step; a named
timeout at the deadline. Reads only. MiniMateClient.wake() wraps it.
- The Series-3 change: after a START, the first read waits S3_SENSOR_CHECK_S
(30 s) before asking; every read then wakes with retries (every 5 s, up to
60 s). A stop is unchanged -- its read-back was confirmed three times tonight.
Tests: a unit deaf for 4 probes is asked a 5th time and answers; a unit that
never answers ends in the named timeout after ~6 probes; a start's first read
waits the sensor check, a stop's does not; every read is preceded by a wake.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Brian's requirements: the instrument's data is the only time source; a filename
is a cross-check, never a fallback (an event SFM receives itself has none).
The record (found by reading a seismo_lab Inspector dump; Series-III reference
§7.8.9): 00 28 05 00 ?? ?? | fe 80 | trigger | stop, times dd mm yyyy(BE) 00 hh
mm ss. Measured on 7,935 waveforms (DL2 + prod store): exactly one candidate
validates in every file; trigger = Blastware's report 1,320/1,320, = filename
7,935/7,935, = the unit's 0C record 10/10.
Provenance (requirement 6, measured): in Blastware's download of 8 BE9441
events the record -- with 24 B before and 22 after -- occurs exactly once in the
unit's own A5 reply payloads; SFM-only downloads (no Blastware) carry it too.
It is instrument data, not Blastware's.
- _embedded_event_record(): every fe 80 before the footer is a candidate; it
counts only with the lead bytes, two well-formed times (zero byte zero),
footer ts1 <= trigger <= stop, stop = footer ts2 or a second before, and a
length matching the record time. Exactly one must count; none or several is
a decode problem, never a guess.
- Without one: the footer estimate, timestamp_source 'estimate', a
decode_problems entry, a WARNING. No filename fallback.
- A filename that disagrees is logged; the decoded time is kept. A paired
report fills in only without a validated record (apply_report_to_event, the
sidecar dict overlay, event_to_sidecar_dict) and is logged when it disagrees.
- decode_blastware_bytes(raw, name=None): no file or name needed;
save_imported_bw uses it (no temp file). Event gains timestamp_source and
decode_problems; the sidecar records both.
- Histograms unchanged (#51): their record (fe f5) is noted, not used.
Tests: raw bytes with no name (ZI0, 7 BE12844 oracles), a disagreeing name, each
validation rule alone, two valid candidates, no filename fallback, report
precedence, sidecar. 7 mutants, each caught. Real data, decoded with no name:
7,961/7,961 waveforms on the record, 0 disagreements with filename or report;
10,433/10,433 prod histograms unchanged. Suite: only the 16 known failures.
Open (reported, not changed): 3 DL2 files named as waveforms whose body the
waveform codec does not recognise keep the footer start, 4 s off, as on dev.
None in prod.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL
BE9441, 2026-10-26 23:41:48 (through the bridge): SFM's start (0x96, Blastware's
own bytes) was acked 0x69 and the unit began monitoring -- Brian saw it -- but
the read-back sent one bare 0x1C two seconds later and got nothing for 120 s,
so the change reported 'sent and acknowledged, but reading the state back
failed' (504, audit 0c1cf813). Nothing was retried.
A monitoring MiniMate ignores a bare request until SESSION_RESET + POLL
(measured 2026-04-08). The read-back had relied on the connect's wake; a stop's
read-back (18:53, the unit idle by then) never needed it. Every state read in
the change now goes through _woken_state: client.poll() (41 03, POLL, 41 03,
POLL -- the connect's own sequence), then 0x1C.
Test: after the send, every 0x1C read is preceded by a POLL. No codec, store or
DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Brings fix/waveform-time-restamp (847900b, abb671a, 3948dc1): insert_events
restamps a re-stored event's row by its Blastware filename; a paired report's
ISO-dated event time is read and survives a backfill; a waveform's time comes
from its filename. Deploy rehearsal on prod's 2026-09-30 snapshot (11,827
files): waveforms 1,016 -> 1,394 of 1,394 on Blastware's exact time, every id
kept, no row lost or merged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL
The review of this branch measured (and I re-measured) that the binary's
trigger -- ts2 minus the record time, from 1e76d08 -- is a second off on 260 of
prod's 1,394 waveforms (2026-09-30 snapshot): 199 late, 61 early. A Blastware
filename encodes Blastware's own time to the second: it equals the report's
Event Time on 81/81 prod and 1,249/1,249 DL2 report-paired waveforms.
The cost of the second was real, not cosmetic:
- events is unique on (serial, timestamp), and on BE9558 the 61 early
waveforms land on their histogram twin's second -- a fresh import wrote each
waveform over its histogram's row (888 files -> 827 rows on dev);
- the release backfill would have moved 161 prod rows that v0.31.0 already had
exactly right a second off.
Same-second collisions across all 11,827 prod-snapshot files: 61 with the
binary's times, 0 with waveform names. Histograms keep the binary's ts1: their
name is Blastware's start time too (13,089/13,089) and ts1 runs a second early
on 97% of them, but with both on Blastware's times a waveform and its
histogram share a second 209 times -- the key cannot hold that. Correcting
histogram times needs the key changed; not here.
- blastware_file.blastware_filename_time(): the inverse of
blastware_filename(), V10.72 'AB0' names only, None for anything else.
- read_blastware_file(path, *, name=None): a waveform takes the name's time;
save_imported_bw passes the upload's real name (it reads a temp file).
- insert_events' restamp matches only Blastware names (every unnamed upload is
'imported.bw', so two events could share it) and, of several copies, moves a
reviewed one with a time first (review items M1, M2).
Tests: the decoder (documented names, encoder round trip, other names), a
waveform's name time, a temp-named read, histograms unchanged, the twin
collision on BE9441's own ZI0 (binary 14:23:43, Blastware 14:23:42), and both
review items. 5 mutants, each caught. Suite: only the 16 known failures.
Codec-library change: TOOL_VERSION to be bumped at release. No schema change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL
Tonight's bridge recording of BE9441 (16:08-19:06) as a fixture, with
Blastware's files: Blastware's and SFM's requests in order (1,596, 722 of them
5A, 722 A5 replies), two Blastware config writes, SFM's stop, and three events.
Event 2 is a 4,096-sps, 2 s histogram of 71,088 bytes -- 139 requests, two 64 KB
crossings.
Measured live the same evening (SFM through the bridge, read-only downloads):
SFM's files for events 1 and 2 are byte-identical to Blastware's (sha256), the
71 KB histogram included -- the first event past the old cap downloaded from a
unit. Event 0, the mic-off histogram, was refused ('decodes as neither'), as
expected on this branch: its decoder fix (#47) is on dev.
The test, fed the recorded replies with max_chunks=128: SFM's walks send
exactly Blastware's 139 and 118 requests and rebuild both files byte for byte.
Reverting the STRT-sized cap (8acb951) fails it. No code change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Measured on BE9441 tonight, through the recording bridge:
- Monitoring flag 0x0B while recording a histogram (confirmed at the unit), 0x00
idle. Only 0x10 had been measured as monitoring (BE11529, 2026-04-08), so the
status showed 'not monitoring' and the change path refused the state as
unknown(0x0B) -- refused, not skipped, which is the design working. 0x0B joins
S3_RUN_STATES and S3_MONITORING_FLAGS as measured. The shared status's
'monitoring' now follows the change path's reading: None for an unmeasured
flag, never a guessed False.
- Free memory 0x000D0E04 arrived as 0d 0e 10 04. The parser keeps the 10 of a
10 02/03/04 escape, so every field counted from the end read one byte off:
419.84 V and 251,655,168 bytes for 6.76 V and 983,028. New
framing.unescape_reply() (also used by parse_strt_end_key) runs first.
Tests: the two recorded replies (idle 16:24, monitoring 18:47) decode to the
unit's own values; each escaped value in the last ten bytes decodes; the status
mapping for 00 / 10 / 0B / unmeasured. No codec, store or DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Measured 2026-10-26. A sub-minute histogram block is [00][segment][ctr LE][0a]
(5 bytes), then one record per interval of BIG-endian peak / half-period pairs
per channel, then 0000 and one more word, then a 7-byte trailer. A record is 20
bytes with the mic and 16 without (4 x channels + 4); the standard 32-byte block
is the same thing holding one record. The last block is short, not padded: it
holds only the intervals recorded and ends on 9c 06 00 42.
#47: a mic-off histogram (16-byte records) decoded to nothing, so a Blastware
import carried no histogram data and SFM's download check would refuse it.
BE9441's K441LTOK.QZ0 (2 s, 22 intervals; fixture) now matches its Blastware
export on 66/66 peaks and 66/66 frequencies.
#49: the old reader took the mic-on records as little-endian from byte 6 -- the
same bytes shifted by one, identical while every high byte is zero. It also
required byte 5 to be 0 (the first record's Tran peak high byte) and read the
last block at full stride, trimming what it overran.
Regression over every DL2 histogram with a Blastware ASCII export (13,089
files, interval counts + every geo peak, frequency and mic dB): old reader
13,087 exact, new 13,089. The two the old one got wrong were one interval each:
K440KZP4.560H #4764 (Long half-period 1 read as 257, mic peak 389 as 133) and
M462KZUD.6R0H #145 (mic peak 6 read as 262).
Walk: blocks follow by block_ctr + 1, or the next segment every 256 blocks; the
last block is bounded by its terminal tail; with no terminal tail the old
trimming rule remains as the fallback. Mic-off records give m_peak None and an
empty MicL channel, as a mic-off waveform does. Inferred, not yet seen in a
file: mic-off 1-minute (28-byte) and 15 s / 5 s mic-off strides.
Not fixed here, noted on #47: half_period_to_hz assumes 1024 sps (512/hp); the
2048-sps histogram's frequencies are 1024/hp.
Operational: a decoder change -- needs a TOOL_VERSION bump at release, then
backfill_sidecars.py + backfill_event_shape.py (~2 h on the NAS) to regenerate
stored histograms. No schema change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
The event-time fix makes a Blastware report's Event Time + Event Date
authoritative over the binary, which gives the trigger only to the second.
On prod's own data it never applied (measured on the 2026-09-30 store
snapshot, all 81 report-paired Series-3 waveforms):
- every one of those reports writes Event Date as ISO ('2026-08-14');
_parse_event_date read only 'August 14, 2026', so event_datetime was None
(Brian's own laptop writes the long form -- it follows the PC's settings);
- the sidecar's bw_report block never stored the event time, and
apply_bw_report_dict_to_event -- the backfill's overlay -- never set it.
The binary's trigger matched Blastware's printed time on 66 of the 81 and was
a second late on 15; 8 of those 15 hold the right time in prod today, so the
release backfill would have made them a second worse.
- _parse_event_date accepts ISO dates too (81/81 now parse to the time
Blastware printed; 0/81 before).
- _bw_report_to_dict stores event_datetime (additive key).
- apply_bw_report_dict_to_event applies it, as apply_report_to_event does.
Prod's sidecars were written by the old parser, so the deploy runs
backfill_sidecars.py with --reparse-txt to re-read the saved .TXTs.
Tests: both date forms, the round trip through the saved block, a block with
no time, and the backfill (--force --reparse-txt) on a prod-shaped row.
Suite: only the 16 known fixture failures.
Codec-library change (report parser): TOOL_VERSION to be bumped at release.
No schema or DB migration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL
The waveform event-time fix (a84a46e / 1e76d08, on dev since 2026-09-20)
changed what time a Series-3 waveform decodes to: the trigger, where v0.31.0
stamped the monitoring-session start -- hours off. events is unique on
(serial, timestamp), so re-storing an old event at its corrected time matched
nothing and inserted it a second time.
Measured 2026-10-26: files stored with v0.31.0 (prod's code), then dev's
backfill_sidecars --force -- the release's own deploy step -- gave every
waveform two rows, one at each time. N844LQHB.ZT0W (BE12844): 06:00:13 and
10:33:29, its false-trigger mark only on the wrong-time copy. A Blastware
re-forward of an old event would do the same with no backfill at all. Prod
has not run the new decoder, so it holds no duplicates yet.
insert_events now matches a row by its stored file first (serial +
blastware_filename; a Blastware name encodes the serial and the second): one
under another time is moved to the new time in place -- same id, review kept --
and the usual refresh follows. When a different stored file already holds the
corrected second, nothing moves and nothing is written; the old upsert wrote
this event's file and peaks over that other event's row. Rows with no stored
file are matched on time alone, as before.
Tests: the move (id, review, refresh), a different file, no file, the
collision, a duplicate already at the new time, and the release backfill end
to end on a v0.31.0-shaped row. Re-checked across versions: v0.31.0 import,
then this branch's backfill -- 5 real files, every row corrected in place, no
duplicates. Suite: only the 16 known fixture failures.
No schema change, no migration, no codec change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL
Follow-ups from the review of 887e75d (verdict: keep, with fixes; no critical).
- The cap: a caller's max_chunks (client.py passes 128) now bounds only a walk
whose end is unknown. With STRT it cut every event past ~66 KB short --
2,545 of 63,500 archived histograms are bigger (the review's count, DL2).
Strict raised; legacy sent a TERM for most of the event, or a bare ValueError.
- A STRT claiming less than one 0x200 chunk, or more than 4 MiB (a sanity bound,
not a measured limit), is refused as a misread, in both modes -- once a bare
ValueError and a 500.
- TERM is sent only for a true tail (< 0x200). After an early end the legacy
walk returns what arrived and sends none.
- build_5a_request wraps build_bw_frame; the old 5A helpers are marked
superseded (kept for tests/test_5a_protocol.py) and their imports dropped.
Tests: all 8 recorded events (were 4) walk exactly as Blastware and rebuild its
own files; an end key holding escaped bytes; a 300 KB event past a 128 cap; both
misread-STRT refusals; the 1A frames BE9441 answered post-fix; the checksum
vectors retargeted. Mutants the review saw survive (no STRT un-escape; a
standard-request escape revert) and 3 new ones are each caught.
Measured on the way: a reply's checksum is SUM8 of its unescaped payload,
748/748. The 'S3 checksums frequently fail' note was the parser summing its
own kept escape bytes; noted, parser unchanged.
Docs: the crossing count corrected to four (events 1, 3, 5, 7); the remaining
stale 5A sections in CLAUDE.md annotated; the write-frame suspicion recorded as
inferred only. No codec, store or DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Brian's Blastware files from the recorded session (events 0, 1, 3, 7 -- three
cross a 64 KB page) as fixtures; SFM's walk, fed Blastware's recorded replies,
writes each one byte for byte. Live the same day, SFM's own downloads of all 8
events were byte-identical to Blastware's (sha256), the 4 crossings included --
and events 2-5's shorter sample counts (20,490-21,011 vs 21,504) are in
Blastware's files too: the unit's own recording.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
CLAUDE.md: the KNOWN BUG entry marked fixed (887e75d) with what settled it, and
retraction notes under the 5A sections that described the misreading (partial
stuffing, offset_hi 0x10 raw, 11-byte params, metadata pages 0x1002/0x1004).
Series-III reference: a 2026-10-26 (3) row. Spec: the MiniMate check updated.
Code comments that called the page bug open, updated; the adapter's struct.error
mapping kept as a defence, its message and test no longer naming the old bug.
Verified live on BE9441 the same day: all 8 events downloaded by serial, the 4
that cross a 64 KB page included, each whole and matching the unit's own peaks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
A recording of Blastware downloading all 8 of BE9441's events (three crossing
a 64 KB page; tests/fixtures/minimate-bench-10-26-26-blastware/) settles it:
every one of its 748 requests is the standard 16-byte payload with a SUM8
checksum and every 02 / 03 / 04 / 10 byte DLE-escaped -- 748/748 re-encode
byte-identically. A 5A request is not a special frame: it is that payload with
a 2-byte LENGTH (0x0200 per chunk, the remainder for TERM) and a 4-byte linear
ADDRESS. The walk is the event's start, +0x200 at a time carrying into the page
byte, then TERM at the next boundary for exactly the remainder.
What the old model misread: the fixed 'offset 0x1002' is length 0x0200 escaped
(10 02 00); the first event's 'metadata pages at 0x1002/0x1004' are its chunks
at 0x0200 and 0x0400; the 16-bit counter could not leave the key's page.
- build_bw_frame escapes the four values (was 0x10 only); new s3_stuff().
- build_5a_request(address, length); parse_strt_end_key() -> the full 32 bits.
- read_bulk_waveform_stream: one linear walk, no event-1 special case; strict
mode keeps every refusal; an end at or before the start is refused as a
corrupt STRT (a page crossing is no longer refused -- it downloads).
Tests: all 540 Blastware 5A requests and all 208 others rebuilt byte for byte;
SFM's walks for events 0, 1, 3 and 7 send exactly Blastware's requests and,
fed Blastware's recorded replies, build whole events. In-page requests are
byte-identical to before. No codec, store or DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Brian's Blastware downloads of BE9441's 20 events give ground truth. SFM's
re-run downloads of events 0, 1, 3, 4 and 10 are byte-identical to Blastware's
own files; imported first through the watcher route, the same events download
as already_stored (no duplicate rows -- the unit's 0C and Blastware's file agree
on serial + timestamp). Fixtures: Blastware's P00/Q10 (now asserted equal to
SFM's builds) and QZ0/T80, the two page-crossing events, as byte-exact targets.
The 64 KB page bug, narrowed by a read-only test walk: carrying the page byte
addresses the first chunk in page 0x12 (answered), but the next request carries
a raw 0x03 inside its params (counter 0x032c) and gets no reply. Pages after
0x11 have such counters; 0x11 does not (event 1 skips 0x0000-0x05FF). Needs a
Blastware wire capture of event 2 or 19 (recorded in CLAUDE.md, the Series-III
reference and the spec). No code change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
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
BE9441 never answered 5A chunk 0x7D06 of event 01122f06 -- twice (bench
2026-10-25 and 2026-10-26), each time rebooting ~11 s later. The request ended
'... 02 03': build_5a_frame wrote the checksum bare, and 0x02 is STX. Sent with
the checksum escaped ('10 02 03') the unit answered in 28 ms; so did chunk
0x7F06 (checksum 0x04) and 0x8B06 (0x10, which bare reads as DLE+ETX), and the
event downloaded whole and verified (21,504 x 3, peaks equal to the unit's).
Escape set {02, 03, 04, 10}: a Micromate's, measured on 251/251 THOR requests;
the MiniMate's own de-stuffing keeps 10 02/03/04 literal. About 1 chunk
request in 64 has such a checksum, so roughly half of all multi-chunk downloads
hit one.
Not changed (no evidence either way): build_bw_frame escapes only 0x10 in its
checksum; a keyed read whose checksum is 02/03/04 is untested. The BW 5A
byte-perfect tests skip on this box (captures absent) -- worth running where
they exist. No codec, store or DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
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
Review of 75d79ec / d73a27d (mutation): removing the chunk-timeout raise went
unnoticed because the TERM raise also said 'ended early', and the no-STRT,
metadata-page, mid-stream-terminator and chunk-cap raises had no test at all;
a re-poll without SESSION_RESET passed because the test double ignored it.
Each refusal is now pinned by its own message, each verified by removing it
(bytecode caching off -- same-second, same-size rewrites reuse a stale .pyc).
The strict tests use the shared replay helpers, which load either fixture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
c32a9e7 made the download check read the 5A body; the Series-3 fake handed
back placeholder frames (['frame']), so 4 plumbing tests in
test_device_access_s3_events.py and test_device_access_event_dispatch.py
failed with "'str' object has no attribute 'data'" -- and that commit was
pushed without the failure set being read. The fake's one-event download now
carries what a real one does: BE9441 event 1's recorded frames, their decoded
waveform and the unit's own peaks for it. Those tests now see verified=True
on a whole event. Suite back to the 16 known fixture failures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
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
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
Review of d73a27d: _await_poll_or_boot no longer reset the parser and pending
frames the way _recv_one(reset_parser=True) did, so a reused protocol object
with half a frame left over failed startup (UnexpectedResponse A4 vs A5).
Restored. Also: the banner check now runs before the tail is trimmed (a read
carrying >48 bytes after the banner lost it), and a banner caught during the
200 ms drain is reported, so startup goes straight to the re-poll loop instead
of the full timeout. Tests for all three.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
3898d03 rewrote docs/instantel_protocol_reference.md with LF endings (a 7,327-line
diff for 3 added lines). CRLF restored; the file's real change is the 3 lines.
Also: BE9441's 21,504 samples are 5 s record + 0.25 s pre-trigger at 4096 sps,
not '+ 1 s' (reference row, fixture README, test comment).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
BE9441 on a serial cable (bench, 2026-10-25) twice sent "Operating System"
~3 s after the port opened and ignored the POLL sent before it; the request
then failed at the full receive timeout (502 after 15 s on /device/info, 504
after 120 s on a download). After a mid-download reboot it answered 8.8 s
after its banner -- the one measured readiness point.
startup()'s first POLL now stops waiting the moment the banner arrives (that
POLL will never be answered) and polls again every 2 s for up to 20 s. Without
a banner nothing changes: a silent unit fails at the normal timeout, with no
re-polling. Only SESSION_RESET and POLL are sent, so this is safe in front of
the change path too.
No codec, store or DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
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
BE9441 rebooted mid-download at the bench (2026-10-25): the chunk at 0x7D06
got one stray byte and then silence, the 5A loop logged "unexpected end-of-
stream -- proceeding to TERM", the TERM got no reply either, and the short event
(17,920 / 17,920 / 17,408 of 21,504 samples) was stored as a success.
read_bulk_waveform_stream(strict=True) now raises on every early end: no STRT,
a metadata page or chunk with no reply, a mid-stream terminator, the chunk cap,
or no TERM reply. get_events passes it for the strict walks (headers_only,
only_key) and, in strict mode, re-raises a 5A error instead of logging
"metadata unavailable" and returning the event without frames. The legacy
full walk is unchanged, call for call (strict passed only when on).
Tests replay BE9441's recorded session through the real MiniMateClient: whole,
event 1 comes back in full; with the 5A stream quiet from chunk 40 while the
walk is still answered -- the bench's reboot -- it raises "ended early".
No codec, store or DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
extract_body_bytes() and write_blastware_file() skipped 13 bytes on A5 frames
1 and 2 unconditionally, as if they were the global metadata pages (0x1002,
0x1004). Only the event-1 walk fetches those; a non-first event goes straight
from the probe to sample chunks (skip 12), so every non-first event SFM built
lost two bytes and decoded truncated (BE9441 event 1: 1,024 / 2,782 / 512
samples instead of 21,504, peaks far low). Frames now say which they are: each
A5 reply echoes its address, and both 0x1002 at frame 1 and 0x1004 at frame 2
must match. Rebuilt from the bench's logged bytes, event 1 decodes 21,504 x 3
with peaks equal to the unit's own 0C values.
Fixtures: BE9441's raw replies for events 0 and 1 (force-added).
Operational: affects only Series-3 files SFM assembled itself (live downloads,
bridges/ach_server.py) for non-first events -- not Blastware's own files, which
is what the production store ingests. Such files are two bytes short; their
.a5.pkl sidecars can rebuild them. No DB or schema change; codec unchanged
(TOOL_VERSION not bumped).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
BE9441 (MiniMate bench, 2026-10-25) answers b"BE9441\x00?": six characters,
the terminator, a leftover byte. rstrip(b"\x00") kept the "?", so the serial
read "BE9441\x00?" and the serial-named path refused every request as the wrong
unit (409). Seven-character serials fill the field to the terminator, which is
why no earlier unit showed it. The legacy /device/info output is cleaned too.
No codec, store or DB change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
The final fix wave's AuditIncomplete landed in _exchange's `except DeviceError`,
which keeps the line -- so on the nine ring / link-fault paths (and a refusal) a
failed audit write turned a hang-up into a held Series-4 line, blocking a THOR
call-home for up to the 5-minute idle hang-up and making "SFM hung up" false.
AuditIncomplete now carries release_line, set by every finish whose path hangs
up anyway, and _exchange honours it. Also pins the Series-3 change path's
retry=False again (the rewritten lost-ack test no longer could).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44