docs(changelog): Unreleased -- #51, unit + time + type and Blastware's histogram times

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-11-04 12:18:20 -05:00
1 parent 074c98823f
commit d75dc6f5f1
1 file changed
+43
+43
View File
@@ -7,6 +7,49 @@ All notable changes to seismo-relay are documented here.
## Unreleased
### Fixed
- ✅ **#51: events are identified by unit + time + type, and histograms take
Blastware's times.**
- **The new key.** The events table was `UNIQUE(serial, timestamp)`, one
event per unit per second. A waveform and its histogram share a second
legitimately: 209 times in prod's 2026-09-30 store. The key is now
`UNIQUE(serial, timestamp, record_type)` (agreed with Brian 2026-11-03).
- **Migration 3** rebuilds the table from its own definition with only the
key swapped, in one transaction. Every column, row and id is kept, and
the indexes are recreated.
- **Lookups:** the upsert, the estimate guard and the restamp match on
type. The restamp also re-types a file's own row in place. An untyped
event still dedups against an untyped row.
- **Histogram times.** A histogram's start and stop now come from its own
event record (lead `00 28 05 00`, source `04 00`, marker `fe f5`). That is
Blastware's Histogram Start and Stop on 63,490 / 63,490 DL2 histograms; the
footer's start was a second early on 97%. Without a validated record, the
footer stands and the decoder logs a decode problem.
- **Interval times and peak times follow:**
- each interval's printed time is its end, start + (i + 1) × interval,
capped at the stop (2,308,524 / 2,308,524 rows; `interval_times`)
- each peak's date and time is its interval's
- **Decode checker:** 760,410 comparisons fixed, 0 regressions, **47 of 88**
fields fully match (was 34). Histogram start and stop times, interval
times and the ten peak date/time fields match every DL2 histogram.
- **Rehearsed on a copy of prod's 2026-09-30 snapshot (15,432 events):**
- The migration kept every row identical, rebuilt the indexes and passed
the integrity check, in 0.27 s.
- `backfill_sidecars.py`: 11,944 files, 0 errors. 9,852 Series-3
histograms moved +1 s in place, with no id lost and review state
untouched. The 209 same-second pairs coexist, and 0 collisions were
refused. (It also created 341 rows for store files that never had one:
the known one-time behaviour, not duplicates.)
- `backfill_event_shape.py`: exit 0, `cleared_stale` 0.
- ⚠ **Schema migration + codec change.** SFM migrates the events table by
itself on first start: back up `seismo_relay.db` first. The release
backfill (`backfill_sidecars.py` then `backfill_event_shape.py`) moves
every Series-3 histogram's stored time by one second, in place.
- Terra-View pairs twins by peak values and reads rows by id: no change
needed there.
- Note for Terra-View's changelog: Series-3 histograms move forward one
second, so an event can cross a deployment-window edge.
- Three tests that pinned the old footer start now pin the record's. The
estimate-guard test's neighbour is now the same type.
- **A Blastware file's geophone range comes from its setup, so Sensitive
events no longer read 8× high.**
- **Where it is:** in the setup's channel blocks, the byte 29 after each