From 167b1026f175f2f5f655ffcfe6ff503fe49a65db Mon Sep 17 00:00:00 2001 From: znetsixe Date: Tue, 19 May 2026 16:35:28 +0200 Subject: [PATCH] docs(CONTRACT): document valve's lack of a maintenance state machine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit valve's schema mode enum includes `maintenance` (which gates sources) but the FSM has no `entermaintenance` / `exitmaintenance` states and the schema's `sequences` block has only startup / shutdown / emergencystop / boot. Maintenance mode therefore disables external sources but doesn't run a maintenance sequence — different shape from rotatingMachine. Added a Limitations section to the CONTRACT so this is explicit rather than surfacing as a wiki TODO. Co-Authored-By: Claude Opus 4.7 (1M context) --- CONTRACT.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRACT.md b/CONTRACT.md index c21f989..f2bc401 100644 --- a/CONTRACT.md +++ b/CONTRACT.md @@ -68,6 +68,18 @@ from the measurement container (e.g. `delta_predicted_pressure`, (`idle → starting → warmingup → operational → accelerating → decelerating → stopping → coolingdown → idle`, plus `off`). +## Limitations vs `rotatingMachine` + +- **No `maintenance` state machine.** The schema's `mode.current` enum + accepts `maintenance` (gates sources via `isValidSourceForMode`), but + the FSM has no `entermaintenance` / `exitmaintenance` states and the + `sequences` schema declares only `startup`, `shutdown`, `emergencystop`, + and `boot`. Configuring `maintenance` mode therefore disables external + command sources but does not put the valve through a maintenance + sequence. Aligns with valve's role as a passive flow-controlled + actuator; lift to RM-style FSM if/when site maintenance procedures + require explicit state transitions. + ## Events emitted by `source.measurements.emitter` The `MeasurementContainer` fires `..` whenever