From 68cad4e2ab013bfac2304846e6eb3cb18f81759f Mon Sep 17 00:00:00 2001 From: serversdown Date: Tue, 20 Oct 2026 18:54:24 -0400 Subject: [PATCH] docs(spec): monitor logs are their own piece of work -- row 6 moves to the parking lot Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44 --- .../2026-10-20-sfm-series4-parity-design.md | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/superpowers/specs/2026-10-20-sfm-series4-parity-design.md b/docs/superpowers/specs/2026-10-20-sfm-series4-parity-design.md index a121d49..4de12c0 100644 --- a/docs/superpowers/specs/2026-10-20-sfm-series4-parity-design.md +++ b/docs/superpowers/specs/2026-10-20-sfm-series4-parity-design.md @@ -55,7 +55,8 @@ Series-4 SFM is for the bench and for units THOR is not holding. ## Scope: the parity table Rows 8 and 11 of the original inventory (runaway stops, rescue/erase) are out -of scope by decision. +of scope by decision. Row 6 (monitor log) moved to the parking lot: it is its +own piece of work, together with call-in monitor-log ingest. | # | job | Series 3 in SFM today | Series 4: protocol status | Series 4 in this phase | |---|---|---|---|---| @@ -64,7 +65,6 @@ of scope by decision. | 3 | Read settings | compliance in `/device/info`; `GET /device/call_home` | `get_setup()` implemented and verified on hardware; call-home: enable + dial string observed, rest unmapped | setup in full; call-home returns enable + dial string + raw | | 4 | List events | `/device/events` (downloads every event to list them) | implemented, and cheap: the chain walk returns sizes | the same event-list shape as Series 3, each event carrying an `event_id` | | 5 | Download an event | `/event/{i}`, `/waveform`, `/blastware_file` | implemented: streams the `.IDFW`/`.IDFH` itself, with a decode self-check | the same download and save-to-DB actions as Series 3. Underneath, Series 4 saves through `/db/import/idf_file` | -| 6 | Monitor log | only via `ach_server` (broken, see the fix list) | `0x0A` read exists; no wrapper or decoder | client wrapper + partial decode | | 7 | Start / stop monitoring | `monitor/start`, `monitor/stop` | mapped, identical to Series 3 (`0x96`/`0x97`, acks `0x69`/`0x68`); never sent | **first write.** Verify with `0x49` state | | 9 | Change call-home settings | `POST /device/call_home` | write mapped (`0x2C` → `0x7E`/`0x7F`, same as Series 3); field map mostly unknown | enable/disable only; the rest waits for the THOR round | | 10 | Change recording settings | `POST /device/config` | sequence mapped (`0xDA` → `0x68/73` → `0x82/83` → `0x71/72`); no encoder | read-modify-write, stop → push → restart, verify with `get_setup()` | @@ -123,7 +123,6 @@ Each series implements the same operation set behind `device_access`: | `read_settings` | `0x1A` compliance decode | `get_setup()` | | `list_events` | today's walk | chain walk (cheap) | | `download_event` | 5A → Blastware file | 5A → `.IDFW`/`.IDFH` | -| `monitor_log` | 501 for now (`ach_server` path is broken) | `0x0A` wrapper | | `start` / `stop` | `0x96` / `0x97` (exists) | `0x96` / `0x97` (new) | | `read_call_home` / `set_call_home_enabled` | exists | `0x2C` / `0x7E`+`0x7F` | | `push_settings` | `/device/config` path (exists) | setup push (new) | @@ -325,7 +324,7 @@ Each safety piece arrives with its first real use, so nothing sits untested. 1. **One contract, reads only.** `device_access.py`, the two adapters, the shared models, series selection, the per-unit lock, the error mapping, and - sessions with ring safety. Rows 1–6 for **both** series through the same + sessions with ring safety. Rows 1–5 for **both** series through the same endpoints. **No writes.** - 1b. **The webapp:** serial + address, and the same read panels for both series. @@ -378,6 +377,23 @@ Each phase is its own implementation plan and its own merge. ## Parking lot +**Monitor logs.** Its own piece of work, data side as much as device side. +A unit calls in at least once or twice a day. With no events (e.g. waveform +mode, no blast that day) it still delivers a **monitor log**: "monitoring from +X to Y". The watchers (one for BW-ACH / Series 3, one for THOR-ACH / Series 4) +use the newest file per unit, event or `.MLG`, as SFM's "last heard from" age. +They forward waveform and histogram files but **not** monitor logs. To decide: +- Ingest call-in monitor logs into SFM. SFM's DB **already has** a + `monitor_log` table (one row per interval, deduped by serial + start time), + and `minimateplus/blastware_file.py` already parses Series-3 `.MLG`. + Missing: anything that takes `.MLG` in from the watchers, and knowledge of + THOR's Series-4 monitor-log file format. +- A live monitor-log read over a connection (Series 4: `0x0A` exists, no + wrapper or decoder; Series 3 in SFM: none). +- What it is for: proof of coverage ("was it monitoring when they blasted?") + and visible gaps. +- Related fix-list item: `ach_server.py`'s `seen_keys`. + **How SFM handles setup files and schedules.** This phase only reads and pushes the unit's *active* setup, with no PC-side library (the `.mmb` same-name/different-contents gotcha). Still to decide, as one question because