docs(changelog): v0.32.0 — waveform times from the instrument's event record, estimates never merge

The release had not shipped, so its entries are corrected in place: the theme,
the time-source entry (the embedded event record, not the filename), the
estimate guard, and a note that the deploy rehearsal stands (record and filename
agree on all 1,394 prod waveforms).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUHR251NLznsFvPSrfegqL
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-10-27 00:18:59 -04:00
1 parent 3a6df9d7f4
commit 04acb99310
1 file changed
+49 -20
+49 -20
View File
@@ -9,9 +9,10 @@ All notable changes to seismo-relay are documented here.
**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
the monitoring-session start, hours off; they now carry the instrument's own
trigger time, read from the event record the unit sends inside its 5A stream,
which matches Blastware's reports on every one of 1,320 report-paired
waveforms -- no filename needed. 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
@@ -44,7 +45,8 @@ work lands with the parity branch. The SFM webapp gains a Diagnostics tab.
Histograms keep `ts1` (the ~24 h window start). A paired report's
`event_datetime` stays authoritative (unit-clock drift).
⚠ **Needs a re-decode backfill** to correct existing stored events' timestamps.
⚠ **As released, the time comes from the Blastware filename** (entry below):
⚠ **As released, the time comes from the instrument's embedded event record**
(entry below):
`ts2 - record time` turned out a second off on 260 of prod's 1,394 waveforms,
and the backfill this needs duplicated every corrected event until the
restamp fix below. See *Migration*.
@@ -167,21 +169,44 @@ work lands with the parity branch. The SFM webapp gains a Diagnostics tab.
The sidecar's `bw_report` block also never stored the event time and the
backfill's overlay never applied it; both do now, and `--reparse-txt`
re-reads the saved `.TXT`s. Codec-library change.
- **A Series-3 waveform's time comes from its Blastware filename.** The name
encodes Blastware's own time to the second: equal to the report's Event Time
on 81/81 prod and 1,249/1,249 DL2 report-paired waveforms. The binary's
`ts2 - record time` is a second off on 260 of prod's 1,394 (199 late, 61
early). That second mattered: on BE9558 the 61 early ones landed on their
histogram twin's second, so a fresh import wrote each waveform over its
histogram's row (888 files -> 827 rows), and the backfill would have moved
161 rows v0.31.0 had right a second off. New
`blastware_file.blastware_filename_time()`; `read_blastware_file(path,
name=...)`, which the import passes the upload's real name. The binary's
estimate remains the fallback for other names. **Histograms keep `ts1`**,
though it runs a second early against Blastware on 97% of them: with both on
Blastware's times a waveform and its histogram share a second 209 times in
prod's store, which `(serial, timestamp)` cannot hold -- #51. Codec-library
change.
- **A Series-3 waveform's time comes from the instrument's own event record.**
The unit sends a copy of its event record inside the 5A stream, so it is in
every Blastware file and every SFM download:
`00 28 05 00 ?? ?? fe 80 [trigger][stop]`, each time
`dd mm yyyy(BE) 00 hh mm ss`.
- **Measured on 7,935 waveforms.** Its trigger equals Blastware's report
1,320/1,320, the filename 7,935/7,935 and the unit's `0C` record 10/10.
- **Provenance.** It occurs once in the unit's own A5 replies for each of 8
recorded events, and in SFM-only downloads.
- **Why it mattered.** The footer's `ts2 - record time` is a second off on
260 of prod's 1,394 (199 late, 61 early). On BE9558 the 61 early ones landed
on their histogram twin's second, so a fresh import wrote each waveform over
its histogram's row (888 files -> 827 rows). The backfill would also have
moved 161 rows that v0.31.0 had right a second off.
- **Validation.** A record counts only if its lead bytes, marker, both times,
its relation to the footer and its length all check out, and exactly one
candidate does.
- **Fallbacks.** Without one the estimate stands, recorded in the event's new
`decode_problems` and the sidecar's `timestamp_source`. A filename is never a
time source, only a cross-check, logged when it disagrees. A paired report
fills in only when there is no record.
- **An estimate is kept, never trusted.** An event is never discarded for
want of an exact time. But an estimated time never moves a row, never adds a
second row for an event already stored, and never lands on another event's
row (`insert_events` writes nothing and logs a warning naming both). The
file and sidecar are kept either way.
- **API.** New `decode_blastware_bytes(raw, name=None)` needs no file (the
import no longer writes a temp file); `blastware_file.blastware_filename_time()`
decodes a name for cross-checks.
- **Histograms keep `ts1`.** It runs a second early against Blastware on 97%
of them, though their record (marker `fe f5`) holds the exact start. With
both on exact times, a waveform and its histogram share a second 209 times
in prod's store, which `(serial, timestamp)` cannot hold -- #51.
- **Open.** 3 archive files named as waveforms are not recognised by the
waveform codec and keep the footer start, as before (none in prod).
Series-III reference §7.8.9.
Codec-library change.
### Added
@@ -575,7 +600,11 @@ 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.
corrected second another file already holds; expected zero. (The rehearsal
ran when waveform times came from the filename; the event record that replaced
it gives the identical time on all 1,394 of those waveforms, so it stands.) A
log line "no validated embedded event record" names a waveform kept on the
footer estimate; expected zero (every prod waveform has one).
**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