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
- Spec: the 1c bench pass on BE9441 and UM20147, each on its own modem, and
its 16 findings (a new 'Left open by the 1c bench' section). Ring-path
results, measured: with THOR's watchdog off a call-home reaches THOR when
nobody holds the line (Run 0, via ListenerAchTcp) and is lost when SFM holds
it (Run A: the unit times out and does not retry); with THOR polling, SFM gets
no reply and THOR is undisturbed (A2, step 1). Decision owed before merge:
the Micromate line hold.
- Micromate reference: retracts 'ListenerAchTcp never used' in place (it
accepted tonight's call-home; port 12345); a call-home that rings on another
receiver's connection is lost; a second TCP connection while THOR holds the
line is accepted but silent.
- CLAUDE.md: 1c status, the open decision, THOR's log location.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
C:\THORDATA\Logs\ (Brian). From the 2026-10-29 log: the watchdog reads each
unit's serial every ~15 s; Unit_CommandOutOfRange follows every ReadUnitStatus
for every unit (fleet-wide noise); after a manual THOR disconnect UM20147
answered neither SFM nor THOR's own reconnect ("Mismatch connection found").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
First full run over DL2's 70,042 report-paired events (22 min, --jobs 4):
every expectation the spec set holds. Setup and notes match everywhere;
geophone samples are exact on 6,491/6,524 waveforms across 2016-2026,
the other 33 being the 1.250 in/s range read 8x on SFM's Normal
assumption; every histogram is typed as a waveform without its filename
(#41); the three #53 files are the only waveform time mismatches. New
findings: histogram PVS, mic psi, mic dB on ~1,000 events, ~37
sub-minute histograms, 26 histogram start dates.
The #53 note is corrected in place: those files decode as waveforms with
Blastware's full sample count; only their time falls back to the footer
start. scratch/verify_bw_fields_against_xml.py is retired -- the
checker replaces it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
Eight tasks: the XML report parser, SFM's side from the bytes alone, the
field-by-field comparison, carve-outs (saturation first), the parallel
runner, the summary and grouped detail report, run-to-run changes with a
one-event view, and the first full run checked against what is known.
While pinning the plan's test values on real files: T438HGTZ.B30W, called
"3 samples short" by the setup-field harness, matches Blastware exactly.
Its Tran, Vert and MicL end 3 samples before Long, and Blastware's own
sample table does the same -- its last three rows carry only the Long cell.
The harness compared Tran's length with the table's row count. The spec
now says so, and the plan compares samples row by row by running channel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
The first of four pieces toward SFM producing everything Blastware reports
from the event file alone: compare every field, sample and histogram
interval with DL2's 70,042 _XML.XML reports (2016-2026), report what
matches, what doesn't and what SFM can't produce yet, grouped for
diagnosis, run after run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
- micromate reference: the watchdog can check every 5 s, hourly or never
(Brian, operator-reported). The 10-14 "reconnects continuously" describes
that THOR's setting, not fixed behaviour; whether a check holds the line,
and how a call-home reaches THOR with the watchdog off, are unmeasured.
- spec, ring-path test: the old setup ("a unit THOR is not otherwise
watching") would not test the production path, since THOR receives a
call-home on its own connection. Revised: UM20147 as a THOR test unit; Run 0
baseline with the watchdog off; Run A with SFM holding the line; Run A2 and
Run B at the fleet's watchdog setting; after the 1c bench pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
- CLAUDE.md: a 1c entry under Where things stand (serial mode, what follows
the unit's own answer, writes off until phases 4-5, the Node-run page tests)
and the legacy-route guard in the REST API notes, with why the stop tools
are exempt.
- Spec: the 1c build status; the ring-path Runs A/B are still owed before
serial mode is used on a unit that calls home to THOR; which parked 1c items
the page settles (CORS: same origin; the S4 mic is not shown).
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
Brian: stopping by command or keypad with ACH enabled makes the unit call home
and upload events + MLG, which can take minutes. Fits UM20147's 0x01 after a
stop (10-25). Owed: measure a MiniMate stop with ACH on, through the bridge.
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
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
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
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
Series-III reference: a 2026-10-26 row (5A checksum escape, measured), and the
2026-10-25 row's guessed cause of the mid-download reboot (battery, firmware)
retracted in place -- it was our request. CRLF kept. Spec: the re-run, item
by item, and what is still owed. CLAUDE.md: the phase-1b bullet brought up to
date.
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
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
Series-III reference: the 0x15 serial is a C string (BE9441's "BE9441\x00?"),
A5 replies echo their address at data[2:6] (metadata pages only on the
event-1 walk), the unit boots on serial-port open (banner ~3 s, answered 8.8 s
after a reboot's banner), one mid-download reboot, and 24 index entries vs 20
listed events (inferred: monitor-log entries). Spec: the MiniMate check's
first run, item by item, and what is still owed. CLAUDE.md: the phase-1b
"unproven" line retracted in place, with the four bugs and the re-run owed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
4b911b1 (and its subject line) called UM20147's start/stop "the first commands
this project originated". The retracted CLAUDE.md line was always about Series
4: the minimateplus stack has sent Series-III writes (start/stop, config push,
erase, call-home config) since April 2026. Narrowed in CLAUDE.md and the
Micromate reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Bench, 2026-10-25, Brian's go per send: 0x96 acked in 464 ms and read back
monitoring at the first 2 s poll (during the sensor check); 0x97 acked in
116 ms, then 0x49 read a new value 0x01 for ~18 s (inferred: the unit's
call-home attempts after a stop) before idle; two stops to an idle unit acked
in 10 ms and changed nothing. Retracts "no command has ever been originated"
in place in CLAUDE.md and the reference's untested list; answers the spec's
stop-while-stopped question.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
- New section "Left open by the phase 1b review (2026-10-21)", after the
1a one: twelve one-line items, each naming the phase it matters to
(retry re-running a whole download, last_used after a kept-line error,
verified:null's two meanings, mic naming + the S4 0x0C mic denormal,
500 detail text, the serial as a directory name, no server-level ring
test, S3 stored record_type, a fresh S4 download's gaps, orphan files,
same-second collisions, 423 Retry-After).
- The 1b bullets now give the owed MiniMate bench check's scope: a 3+
event list (1F(browse) after 1E(arm) without 1F(arm)), a non-first
event, a histogram (capture its 0C), an event past 64 KB (the named
502), a stale id (no 5A), and a dropped reply via mm_link-style fault
injection.
- The 1b "Download" bullet's "refreshes the row" is retracted in place:
the final review changed it to "returns the row, writes nothing".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Ten tasks, test-first: the is_open fix, two client reads, core types, the
per-unit lock, both adapters, Series-4 sessions with ring safety,
DeviceAccess with the reaper and the contract tests, the endpoints, and a
read-only bench check on UM20147.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
Nothing breaks between phases: the shared models apply when a request names
the unit by serial, and the legacy Series-3 path stays as it is until the
webapp (1c) and watch_unit.sh move over.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44