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 d8e91ed..875d3c0 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 @@ -540,6 +540,55 @@ matters to is named. through `0x94`/`0x48` may detect unsaved keypad edits, which would undercut "can't be detected from the wire". One bench check. +## Left open by the phase 3 review (2026-10-23) + +The whole-phase review judged phase 3 ready for the bench, with nothing that +sends twice, sends without an audit row, or sends to an unverified unit. These +items were left for later on purpose: + +- **Series-3 change path shape. Settle before the MiniMate bench check.** + - The change path makes one POLL at a 120 s receive timeout, with no retry. A + cold MiniMate that drops that POLL costs 120 s of a locked unit and then a + 504. The legacy route retried `poll()` on the same connection at 10 s. + - The identity read is a full `connect()` (POLL, `0x15`, `0x01`, `0x1A`, `0x08`). + The spec asks for one serial read. + - Proposed: 10 s timeouts before the send, one identity-poll retry on the same + connection (a read, never the write), POLL plus `0x15` in place of + `connect()`, and the long timeout only on the read-back polls. + - That needs two measurements first: whether a *monitoring* MiniMate answers + the full `connect()` over TCP, and what `0x1C` reads during the ~40 s sensor + check. +- **For 1c (the webapp).** + - 409 means three things. "Wrong unit" and "unmeasured state" sent nothing; + "mismatch" sent a frame with a clean ack. Only the body tells them apart. + - `ChangeResult.detail` is a dict, so the webapp's `e.detail || r.statusText` + would print `[object Object]`. + - The 60 s verify window, plus the call-up, plus up to 20 s of lock wait, + exceeds the 60 s Terra-View proxy timeout. A mismatch could never be + delivered through that proxy. + - Nothing marks `pending` rows left by a restart mid-change. Reconcile them at + server start only, never on every `SeismoDb` open. +- **A late `0x69` after a lost ack.** When the ack is lost but the follow-up + read validates, the line is kept, and a late `0x69` then breaks the next + unrelated request with a 502. Safe, but confusing. Hanging up after any lost + ack needs a way to release the line on a path that returns a result. +- **Legacy routes take no per-address lock.** They can interleave with an + audited change on the same address. This belongs with the blind-stop-tools + decision, which is still open. +- **Test and scan gaps.** + - The `protocol.execute(` caller scan does not catch an aliased caller. + - Dropping the S4 ack's `data` field is not caught by any test. + - The fake's `fail` queue is also consumed by `read_unsolicited` on the change + path. +- **Docs nits.** + - `s4.py` says `ChangeUnconfirmed` follows "a link fault or a ring". It also + follows a `calling_home` read. + - The 2026-10-02 CLAUDE.md bullet still says "Read-only". + - The route docstrings' 409 line omits the held-line `WrongUnit`. +- **For the merge to dev.** The changelog states: a new `device_commands` table + (`CREATE TABLE IF NOT EXISTS`) plus a `_migrate` step that adds `sent` and + `states` to tables created from this branch. Prod: no migration, no backfill. + ## Table 2: to be added later (both series) | area | item |