From 895ce4917efc6f60669573fafed1f32d4113ca16 Mon Sep 17 00:00:00 2001 From: serversdown Date: Mon, 26 Oct 2026 19:32:19 -0400 Subject: [PATCH] =?UTF-8?q?chore(release):=20v0.32.0=20=E2=80=94=20event?= =?UTF-8?q?=20times=20you=20can=20trust,=20and=20Series=204=20mapped?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Series-3 waveform times carry Blastware's own (from the filename), re-stored events move their rows instead of duplicating, prod's ISO-dated reports are read, mic-off / mic-on sub-minute histograms decode right (#47, #49), Micromate .h5 samples are on Thor's own scale (#42). Plus the Series-4 live protocol, read-only client and setup decode (no shipped code path yet) and the SFM Diagnostics tab. TOOL_VERSION 0.31.0 -> 0.32.0: the deploy owes backfill_sidecars.py --force --reparse-txt, backfill_thor_events.py, backfill_event_shape.py (~2 h on the NAS), rehearsed on prod's 2026-09-30 store snapshot -- see Migration. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL --- CHANGELOG.md | 69 ++++++++++++++++++++++++++++++++--- CLAUDE.md | 2 +- README.md | 2 +- minimateplus/event_file_io.py | 2 +- pyproject.toml | 2 +- 5 files changed, 68 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8587a98..1d3f948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,30 @@ All notable changes to seismo-relay are documented here. --- -## Unreleased +## v0.32.0 — 2026-10-26 + +**Event times you can trust, and Series 4 mapped end to end.** Two threads. + +The first is correctness on stored data. Series-3 waveforms were stamped with +the monitoring-session start, hours off; they now carry Blastware's own time, +read from the Blastware filename, which matches Blastware's reports on every +one of 1,330 report-paired waveforms. Getting the correction into prod safely +needed three more fixes found on the way: re-storing an event at its corrected +time duplicated it, prod's ISO-dated reports were never read, and the binary's +own estimate is a second off often enough to land waveforms on their histogram +twins. Sub-minute histograms recorded with the mic off now decode, and mic-on +ones are read right (#47, #49). Micromate `.h5` samples are on Thor's own +scale (#42). The deploy was rehearsed on prod's own (snapshot) store before +release: every waveform on Blastware's exact time, every row id kept. + +The second is Series IV. The Micromate live wire protocol is reverse-engineered +end to end (`docs/micromate_protocol_reference.md`), with a read-only live +client in `micromate/`, the call-home session captured, and a Micromate's setup +decoded. None of it is on a shipped code path yet -- SFM's Series-4 device +work lands with the parity branch. The SFM webapp gains a Diagnostics tab. + +⚠ **This release owes prod a backfill, and moves stored event times** -- see +*Migration* below. ### Fixed @@ -118,6 +141,11 @@ All notable changes to seismo-relay are documented here. the `TOOL_VERSION` bump plus `backfill_sidecars.py` and `backfill_event_shape.py` to regenerate stored histograms -- the same run this release's other fixes need (~2 h on the NAS). No schema change. + It changes **none** of the 10,433 histograms in prod's store (2026-09-30 + snapshot): the misread needs a half-period of 256 or more, below ~2 Hz at the + archive's and prod's 1,024 sps. At 4,096 sps it is common -- below ~8 Hz -- + and on BE9441's 3,398-interval `K441LTON.900` the old reader got 87 intervals + wrong (~2.6%); the new one gets all 3,398. - **Re-storing an event at a corrected time duplicated it.** The event-time fix above moves a waveform's time, and `events` is unique on @@ -521,10 +549,41 @@ All notable changes to seismo-relay are documented here. ### Migration -**None.** No codec change, no waveform-store change, no DB or schema change, -and **no `TOOL_VERSION` bump** — so no `backfill_sidecars.py` / -`backfill_event_shape.py` run is owed. The webapp is served from the image, so -its changes appear after the next `sfm` rebuild. +⚠ **This release owes prod a backfill, and it moves stored event times.** +`TOOL_VERSION` is bumped to **0.32.0**, which gates the regeneration. **Back up +`seismo_relay.db` first.** Then, in the `sfm` container, in this order (the +scripts default to `bridges/captures/seismo_relay.db` and its `waveforms/`): + +1. `python scripts/backfill_sidecars.py --force --reparse-txt` -- re-decodes + every Series-3 event: sidecars and `.h5` regenerate, **waveform times move + to Blastware's** (each DB row in place -- id and review kept), and + `--reparse-txt` re-reads the saved `.TXT` reports. ⚠ `--reparse-txt` is + required the first time: prod's sidecars were written by the old parser, and + a run without it leaves report-paired rows on the binary's estimate. + ⚠ **~2 h on the NAS.** +2. `python scripts/backfill_thor_events.py` -- Series-4 `.h5` samples onto + Thor's own LSB (#42). +3. `python scripts/backfill_event_shape.py --db-path bridges/captures/seismo_relay.db + --store-root bridges/captures/waveforms` -- the shape/offset metrics read the + regenerated samples. + +**Rehearsed** on prod's 2026-09-30 store snapshot (11,827 Series-3 files; stale +-- prod has more since): stored with v0.31.0 exactly as the watcher does, then +step 1 with this release. Waveforms on Blastware's exact time **1,016 → 1,394 +of 1,394**: 373 had been hours off (up to 14.3 h) and 5 a second off. Every row +id kept, none lost or merged, no refusals, no errors. Histograms do not move +(#51). One known extra row: a histogram whose time does not decode +(BE18003 `T003LCYV.JD0H`) gains a duplicate on every backfill -- pre-existing, +#52. A log line "nothing stored" from `insert_events` names a file whose +corrected second another file already holds; expected zero. + +**Terra-View** reads SFM's rows by id and needs no change, but its views show +the corrected times: waveforms move up to hours later in the day, so an event +can land in a different day, deployment window or summary, and waveform / +histogram twin matching can change. That is the correction, not a fault. + +The webapp is served from the image, so its changes appear after the next +`sfm` rebuild. The Series-4 live client adds **new** modules under `micromate/` (`framing.py`, `protocol.py`, `client.py`) and appends three dataclasses to diff --git a/CLAUDE.md b/CLAUDE.md index d95e201..d1c42e4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ Ground-up Python replacement for **Blastware**, Instantel's Windows-only software for managing MiniMate Plus seismographs. Connects over direct RS-232 or cellular modem -(Sierra Wireless RV50 / RV55). Current version: **v0.31.0**. +(Sierra Wireless RV50 / RV55). Current version: **v0.32.0**. Stack-level context — which repo owns what, and how the three project versions pair — lives in `../terra-view/docs/tmi-stack.md`, which is also loaded as diff --git a/README.md b/README.md index 83a897c..807b18c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# seismo-relay `v0.31.0` +# seismo-relay `v0.32.0` A ground-up replacement for **Blastware** — Instantel's aging Windows-only software for managing seismographs. Supports both the **MiniMate Plus diff --git a/minimateplus/event_file_io.py b/minimateplus/event_file_io.py index 0b0aa14..a6d487e 100644 --- a/minimateplus/event_file_io.py +++ b/minimateplus/event_file_io.py @@ -50,7 +50,7 @@ SIDECAR_KIND = "sfm.event" # bumped without a `pip install` re-run — leading to confusing stale # version stamps in sidecars. Bump this constant and CHANGELOG.md # together at release time. -TOOL_VERSION = "0.31.0" # +/sensor_check group (schema v2); gates the backfill regen +TOOL_VERSION = "0.32.0" # waveform times from the BW name, report dates, histogram reader; gates the backfill regen try: # Best-effort: prefer the installed metadata when it's NEWER than the diff --git a/pyproject.toml b/pyproject.toml index 10ea7e7..0f3a8c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "seismo-relay" -version = "0.31.0" +version = "0.32.0" description = "Python client and REST server for MiniMate Plus seismographs" requires-python = ">=3.10" dependencies = [