Release v0.34.0 — Series-4 parity, and most of Blastware's report from the event file alone #59

Merged
serversdown merged 245 commits from dev into main 2026-11-04 18:19:24 -05:00
Showing only changes of commit 75b7694983 - Show all commits
@@ -390,6 +390,27 @@ Each safety piece arrives with its first real use, so nothing sits untested.
this phase), and `0xA2` is refused always. this phase), and `0xA2` is refused always.
3. **Start/stop monitoring** (row 7): the first live write, at the bench. 3. **Start/stop monitoring** (row 7): the first live write, at the bench.
Brings the identity check, the audit table and the read-back framework. Brings the identity check, the audit table and the read-back framework.
- **Preconditions from the phase-2 final review (2026-10-22):**
- **Write permission is scoped to one call, not a connection.**
`MicromateProtocol.execute(plan)` is the only write path: it transmits
exactly that plan's frames and nothing else. The connection's own
`allowed_writes` stays empty -- a held `Series4Session` lives for
minutes, and a grant made at call-up would outlive the request.
- **A code-reviewed ceiling** in `micromate/opcodes.py` lists the write
SUBs any code may transmit: `{0x96, 0x97}` in this phase, each later
phase adding its own. Delete (`0xA8`/`0xAA`), raw file writes
(`0x8D`/`0x8E` -- they could reach the modem settings) and `0xA2` are
enabled only by a spec change.
- **A write is never retried.** `DeviceAccess._dispatch`'s retry-once
refuses change-tier operations structurally, not by comment.
- **Build the plan inside the unit lock, on the same line, right before
sending.** A plan returned by an earlier dry run is never transmitted;
optionally the dry run returns a digest the live call must echo.
- **Read state first** (`0x49` for start/stop, `0x2C` for call-home) and
decide on purpose whether "already in that state" is skipped or is the
experiment.
- **Refuse writes unless this connection's responses carried Micromate
flags** (0xC5/0x03), alongside the serial identity check.
4. **Call-home enable/disable** (row 9). 4. **Call-home enable/disable** (row 9).
5. **Setup push** (row 10): one field first, then several. 5. **Setup push** (row 10): one field first, then several.
@@ -442,8 +463,22 @@ plan's scratch ledger. None blocks 1a; the phase each one matters to is named.
a hostname vs an IP, or `/dev/serial/by-id/...` vs `/dev/ttyACM0`, gets two a hostname vs an IP, or `/dev/serial/by-id/...` vs `/dev/ttyACM0`, gets two
locks for one link. locks for one link.
- **A serial-less request to an UNHELD Micromate still runs Series-3 bytes.** - **A serial-less request to an UNHELD Micromate still runs Series-3 bytes.**
The guard only knows about lines SFM holds. This is the phase-2 opcode The guard only knows about lines SFM holds. ~~This is the phase-2 opcode
guard's job. guard's job.~~
**Measured by the phase-2 final review (2026-10-22):** the phase-2 gate
covers `micromate/` only and cannot see this traffic. Only the three blind
stop tools (`/device/stop_monitoring_blind`, `_slow_drip`, `_spam`) send a
write before any parsed reply. Every other legacy write route needs a
parsed `0xA4` POLL reply, and `S3FrameParser` never yields one from
Micromate bytes (364 real responses → 29 spurious frames, none `0xA4`). So
erase, config and call-home writes cannot reach a Micromate. Worst case
(inferred): an unheld Micromate at the address stops monitoring, via the
Series-3 `0x97` at offset 0x0000, never sent to one. The hazard is identity
(a moved modem or a stale IP), not series. **Brian's decision** (the legacy
routes are bound by 'behave exactly as today'): accept until the legacy path
retires after 1c, then require `serial` on the blind tools; or, as an
interim, refuse a blind tool when SFM's DB last saw a `UM` serial at that
host.
- **`tcp_port` coercion mismatch.** The guard parses with `int()`, pydantic - **`tcp_port` coercion mismatch.** The guard parses with `int()`, pydantic
coerces more loosely (`"9034.0"`), so such a request passes the guard coerces more loosely (`"9034.0"`), so such a request passes the guard
unchecked. Parse with pydantic's own int coercion, or fail closed. unchecked. Parse with pydantic's own int coercion, or fail closed.
@@ -488,6 +523,20 @@ matters to is named.
before the database lookup finds it (the lookup is on the SDM side, after the before the database lookup finds it (the lookup is on the SDM side, after the
device layer). Wasted transfer, not bad data (1c). device layer). Wasted transfer, not bad data (1c).
## Left open by the phase 2 review (2026-10-22)
- **`plan_setup_push` takes any name (phase 5).** It is not tied to the `0x41`
read, and it does not refuse `factory.MMB` or a non-active target, which the
spec requires; the name's case varies (`test2.MMB` vs `test2.mmb`).
- **Stripped-name caveat.** `get_active_setup()` strips whitespace, so a name
with leading or trailing spaces does not round-trip.
- **Bench questions.** Whether a Micromate honours offset 0x0000 on
`0x96`/`0x97`, accepts a no-op call-home write, or accepts 0x00 at `[5]`.
Settle all three at the bench.
- **Phase-5 lead (inferred).** Comparing `0x1A` against the active `.MMB` read
through `0x94`/`0x48` may detect unsaved keypad edits, which would undercut
"can't be detected from the wire". One bench check.
## Table 2: to be added later (both series) ## Table 2: to be added later (both series)
| area | item | | area | item |