Stored Series-3 histogram times run one second early against Blastware, on 97% of them. Correcting that needs the events table's key changed first, so v0.32.0 leaves histograms alone.
Measured (2026-10-26)
A Blastware filename carries Blastware's own time. For histograms it equals the report's "Histogram Start Time" on 13,089 / 13,089 DL2 archive histograms. (For waveforms it equals the report's Event Time on 1,330 / 1,330.)
The binary's ts1 (what we store) is 1 s early on 12,726 / 13,089 archive histograms and on 10,070 of the 10,433 in prod's 2026-09-30 store snapshot. It's exact on 354. 8 files read about a day (86,153 s) off.
Why not just switch.events is UNIQUE(serial, timestamp). With both waveforms and histograms on Blastware's times, a waveform and its histogram share a second 209 times across prod's snapshot (BE9558 91, BE17353 67, BE18438 44, BE12599 6, BE12844 1). That's legitimate in Blastware's timing, but the table can't hold it. Waveforms alone on filename time give 0 collisions, which is what v0.32.0 ships.
To fix
Key events so a waveform and a histogram may share a second: e.g. UNIQUE(serial, timestamp, kind), or identify rows by (serial, blastware_filename). That's a schema migration.
Then read_blastware_file takes the filename time for histograms too, and the backfill moves the rows; the restamp already handles moving a row in place.
Look at the 8 day-off histograms separately.
Check what Terra-View's waveform/histogram twin matching assumes about the 1 s offset before changing it.
## Summary
**Stored Series-3 histogram times run one second early against Blastware**, on 97% of them. Correcting that needs the events table's key changed first, so v0.32.0 leaves histograms alone.
## Measured (2026-10-26)
- **A Blastware filename carries Blastware's own time.** For histograms it equals the report's "Histogram Start Time" on **13,089 / 13,089** DL2 archive histograms. (For waveforms it equals the report's Event Time on 1,330 / 1,330.)
- **The binary's ts1 (what we store) is 1 s early on 12,726 / 13,089** archive histograms and on **10,070 of the 10,433** in prod's 2026-09-30 store snapshot. It's exact on 354. **8** files read about a day (86,153 s) off.
- **Why not just switch.** `events` is `UNIQUE(serial, timestamp)`. With both waveforms and histograms on Blastware's times, a waveform and its histogram share a second **209 times** across prod's snapshot (BE9558 91, BE17353 67, BE18438 44, BE12599 6, BE12844 1). That's legitimate in Blastware's timing, but the table can't hold it. Waveforms alone on filename time give **0** collisions, which is what v0.32.0 ships.
## To fix
- Key events so a waveform and a histogram may share a second: e.g. `UNIQUE(serial, timestamp, kind)`, or identify rows by `(serial, blastware_filename)`. That's a schema migration.
- Then `read_blastware_file` takes the filename time for histograms too, and the backfill moves the rows; the restamp already handles moving a row in place.
- Look at the 8 day-off histograms separately.
- Check what Terra-View's waveform/histogram twin matching assumes about the 1 s offset before changing it.
Update (2026-10-26): histogram files carry the instrument's own event record too, so the fix here has a content source and won't need the filename.
The record is [lead] fe f5 [start 8 B][stop 8 B], times as dd mm yyyy(BE) 00 hh mm ss. It's the same structure as the waveform record (fe 80) documented in Series-III reference §7.8.9. Measured:
Report: its start equals Blastware's report "Histogram Start Time" on 14,498 / 14,498 report-paired histograms (DL2 + prod store).
Filename: it equals the filename's time on 73,857 / 73,857.
Locating it: a simple locator missed it in ~1% of files. A marker search found 68 of those; 8 small 2018–2022 histograms have no valid record and need another source or a reported decode problem.
What's still needed is unchanged: the events key must allow a waveform and a histogram in the same second (209 such pairs in prod's store). v0.32.0 switched waveforms to their record (f91949b); histograms still use the footer's ts1.
**Update (2026-10-26):** histogram files carry the instrument's own event record too, so the fix here has a content source and won't need the filename.
The record is `[lead] fe f5 [start 8 B][stop 8 B]`, times as `dd mm yyyy(BE) 00 hh mm ss`. It's the same structure as the waveform record (`fe 80`) documented in Series-III reference §7.8.9. Measured:
- **Report:** its start equals Blastware's report "Histogram Start Time" on **14,498 / 14,498** report-paired histograms (DL2 + prod store).
- **Filename:** it equals the filename's time on **73,857 / 73,857**.
- **Locating it:** a simple locator missed it in ~1% of files. A marker search found 68 of those; **8 small 2018–2022 histograms have no valid record** and need another source or a reported decode problem.
What's still needed is unchanged: the events key must allow a waveform and a histogram in the same second (209 such pairs in prod's store). v0.32.0 switched waveforms to their record (`f91949b`); histograms still use the footer's `ts1`.
Fixed on dev (merge 074c988). Ships in the next release.
1. The key. Events are now UNIQUE(serial, timestamp, record_type), unit + time + type, as agreed with Brian.
Migration 3 rebuilds the table from its own current definition with only the key swapped, in one transaction: every column, row and id kept, indexes recreated.
The upsert, the estimate guard and the restamp match on type. The restamp also re-types a file's own row in place.
2. Histogram times from the file. Each histogram has an event record like a waveform's: lead 00 28 05 00, source 04 00, marker fe f5, then start and stop. Measured on DL2:
start = Blastware's on 63,490 / 63,490
stop = Blastware's on 63,490 / 63,490
exactly one record per histogram (63,500 / 63,500), start 0–1 s after the footer's, stop 0–1 s before
The footer remains a flagged fallback. With these times the decoder no longer needs the filename: the decoded time equals the file's Blastware name.
3. What follows from a correct start:
each interval's time is its end, start + (i + 1) × interval capped at the stop: 2,308,524 / 2,308,524 rows
each peak's date and time is its interval's: 2,000 / 2,000 on a sample
Decode checker, all 70,112 DL2 events:
histogram start time 1,860 → 63,518 / 63,518
stop time 63,518 / 63,518
interval times and the ten peak date/time fields match every histogram
0 regressions
Rehearsed on a copy of prod's 2026-09-30 snapshot (15,432 events):
migration: every row identical, integrity ok
backfill_sidecars.py: 11,944 files, 0 errors; 9,852 histograms moved +1 s in place, no id lost; the 209 same-second waveform/histogram pairs now coexist, BE9558 91, BE17353 67, BE18438 44, BE12599 6, BE12844 1, exactly as counted above
backfill_event_shape.py: clean
Twin matching is fine on both sides. Terra-View pairs twins by peak values (ft_suspicion._twin_key). SFM's find_twins uses an inclusive interval start, so a waveform in its histogram's second still pairs.
**Fixed on `dev`** (merge `074c988`). Ships in the next release.
**1. The key.** Events are now `UNIQUE(serial, timestamp, record_type)`, unit + time + type, as agreed with Brian.
- Migration 3 rebuilds the table from its own current definition with only the key swapped, in one transaction: every column, row and id kept, indexes recreated.
- The upsert, the estimate guard and the restamp match on type. The restamp also re-types a file's own row in place.
**2. Histogram times from the file.** Each histogram has an event record like a waveform's: lead `00 28 05 00`, source `04 00`, marker `fe f5`, then start and stop. Measured on DL2:
- start = Blastware's on 63,490 / 63,490
- stop = Blastware's on 63,490 / 63,490
- exactly one record per histogram (63,500 / 63,500), start 0–1 s after the footer's, stop 0–1 s before
The footer remains a flagged fallback. With these times the decoder no longer needs the filename: the decoded time equals the file's Blastware name.
**3. What follows from a correct start:**
- each interval's time is its end, start + (i + 1) × interval capped at the stop: 2,308,524 / 2,308,524 rows
- each peak's date and time is its interval's: 2,000 / 2,000 on a sample
**Decode checker, all 70,112 DL2 events:**
- histogram start time 1,860 → 63,518 / 63,518
- stop time 63,518 / 63,518
- interval times and the ten peak date/time fields match every histogram
- 0 regressions
**Rehearsed on a copy of prod's 2026-09-30 snapshot (15,432 events):**
- migration: every row identical, integrity ok
- `backfill_sidecars.py`: 11,944 files, 0 errors; 9,852 histograms moved +1 s in place, no id lost; **the 209 same-second waveform/histogram pairs now coexist**, BE9558 91, BE17353 67, BE18438 44, BE12599 6, BE12844 1, exactly as counted above
- `backfill_event_shape.py`: clean
**Twin matching is fine on both sides.** Terra-View pairs twins by peak values (`ft_suspicion._twin_key`). SFM's `find_twins` uses an inclusive interval start, so a waveform in its histogram's second still pairs.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Stored Series-3 histogram times run one second early against Blastware, on 97% of them. Correcting that needs the events table's key changed first, so v0.32.0 leaves histograms alone.
Measured (2026-10-26)
eventsisUNIQUE(serial, timestamp). With both waveforms and histograms on Blastware's times, a waveform and its histogram share a second 209 times across prod's snapshot (BE9558 91, BE17353 67, BE18438 44, BE12599 6, BE12844 1). That's legitimate in Blastware's timing, but the table can't hold it. Waveforms alone on filename time give 0 collisions, which is what v0.32.0 ships.To fix
UNIQUE(serial, timestamp, kind), or identify rows by(serial, blastware_filename). That's a schema migration.read_blastware_filetakes the filename time for histograms too, and the backfill moves the rows; the restamp already handles moving a row in place.Update (2026-10-26): histogram files carry the instrument's own event record too, so the fix here has a content source and won't need the filename.
The record is
[lead] fe f5 [start 8 B][stop 8 B], times asdd mm yyyy(BE) 00 hh mm ss. It's the same structure as the waveform record (fe 80) documented in Series-III reference §7.8.9. Measured:What's still needed is unchanged: the events key must allow a waveform and a histogram in the same second (209 such pairs in prod's store). v0.32.0 switched waveforms to their record (
f91949b); histograms still use the footer'sts1.Fixed on
dev(merge074c988). Ships in the next release.1. The key. Events are now
UNIQUE(serial, timestamp, record_type), unit + time + type, as agreed with Brian.2. Histogram times from the file. Each histogram has an event record like a waveform's: lead
00 28 05 00, source04 00, markerfe f5, then start and stop. Measured on DL2:The footer remains a flagged fallback. With these times the decoder no longer needs the filename: the decoded time equals the file's Blastware name.
3. What follows from a correct start:
Decode checker, all 70,112 DL2 events:
Rehearsed on a copy of prod's 2026-09-30 snapshot (15,432 events):
backfill_sidecars.py: 11,944 files, 0 errors; 9,852 histograms moved +1 s in place, no id lost; the 209 same-second waveform/histogram pairs now coexist, BE9558 91, BE17353 67, BE18438 44, BE12599 6, BE12844 1, exactly as counted abovebackfill_event_shape.py: cleanTwin matching is fine on both sides. Terra-View pairs twins by peak values (
ft_suspicion._twin_key). SFM'sfind_twinsuses an inclusive interval start, so a waveform in its histogram's second still pairs.