From 8252a5f898a94b2d5131aa1313290601e98030b8 Mon Sep 17 00:00:00 2001 From: znetsixe Date: Tue, 19 May 2026 16:05:34 +0200 Subject: [PATCH] =?UTF-8?q?fix(schemas):=20drop=20dead=20config=20?= =?UTF-8?q?=E2=80=94=20allowedActions=20(valve/VGC)=20+=20calculationMode?= =?UTF-8?q?=20(RM/valve/VGC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code audit across all consumers found: - `calculationMode` is declared in rotatingMachine.json, valve.json, and valveGroupControl.json schemas but NEVER read by any code. Pure dead config — entered values are silently discarded. Removed from all three. - `allowedActions` is declared in valve.json and valveGroupControl.json but their `flowController.handleInput` only calls `isValidSourceForMode`, never `isValidActionForMode`. The schema would invite users to configure action allow-lists that never gate anything. Removed from both. Kept in `rotatingMachine.json` and `machineGroupControl.json` where the action allow-list IS enforced (specificClass / handlers / strategies). Schema fixes only — no runtime behaviour changes. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/configs/rotatingMachine.json | 21 ---------- src/configs/valve.json | 62 ------------------------------ src/configs/valveGroupControl.json | 62 ------------------------------ 3 files changed, 145 deletions(-) diff --git a/src/configs/rotatingMachine.json b/src/configs/rotatingMachine.json index 23f2ff4..36e92aa 100644 --- a/src/configs/rotatingMachine.json +++ b/src/configs/rotatingMachine.json @@ -459,27 +459,6 @@ "description": "Predefined sequences of states for the machine." }, - "calculationMode": { - "default": "medium", - "rules": { - "type": "enum", - "values": [ - { - "value": "low", - "description": "Calculations run at fixed intervals (time-based)." - }, - { - "value": "medium", - "description": "Calculations run when new setpoints arrive or measured changes occur (event-driven)." - }, - { - "value": "high", - "description": "Calculations run on all event-driven info, including every movement." - } - ], - "description": "The frequency at which calculations are performed." - } - }, "flowNumber": { "default": 1, "rules": { diff --git a/src/configs/valve.json b/src/configs/valve.json index c47f272..3e334da 100644 --- a/src/configs/valve.json +++ b/src/configs/valve.json @@ -205,47 +205,6 @@ "description": "The operational mode of the machine." } }, - "allowedActions":{ - "default":{}, - "rules": { - "type": "object", - "schema":{ - "auto": { - "default": ["statusCheck", "execMovement", "execSequence", "emergencyStop"], - "rules": { - "type": "set", - "itemType": "string", - "description": "Actions allowed in auto mode." - } - }, - "virtualControl": { - "default": ["statusCheck", "execMovement", "execSequence", "emergencyStop"], - "rules": { - "type": "set", - "itemType": "string", - "description": "Actions allowed in virtualControl mode." - } - }, - "fysicalControl": { - "default": ["statusCheck", "emergencyStop"], - "rules": { - "type": "set", - "itemType": "string", - "description": "Actions allowed in fysicalControl mode." - } - }, - "maintenance": { - "default": ["statusCheck"], - "rules": { - "type": "set", - "itemType": "string", - "description": "Actions allowed in maintenance mode." - } - } - }, - "description": "Information about valid command sources recognized by the machine." - } - }, "allowedSources":{ "default": {}, "rules": { @@ -342,27 +301,6 @@ }, "description": "Predefined sequences of states for the machine." - }, - "calculationMode": { - "default": "medium", - "rules": { - "type": "enum", - "values": [ - { - "value": "low", - "description": "Calculations run at fixed intervals (time-based)." - }, - { - "value": "medium", - "description": "Calculations run when new setpoints arrive or measured changes occur (event-driven)." - }, - { - "value": "high", - "description": "Calculations run on all event-driven info, including every movement." - } - ], - "description": "The frequency at which calculations are performed." - } } } \ No newline at end of file diff --git a/src/configs/valveGroupControl.json b/src/configs/valveGroupControl.json index e61e4a3..f11a995 100644 --- a/src/configs/valveGroupControl.json +++ b/src/configs/valveGroupControl.json @@ -176,47 +176,6 @@ "description": "The operational mode of the valveGroupControl." } }, - "allowedActions":{ - "default":{}, - "rules": { - "type": "object", - "schema":{ - "auto": { - "default": ["statusCheck", "execSequence", "emergencyStop", "valvePositionChange", "totalFlowChange", "valveDeltaPchange"], - "rules": { - "type": "set", - "itemType": "string", - "description": "Actions allowed in auto mode." - } - }, - "virtualControl": { - "default": ["statusCheck", "execSequence", "emergencyStop", "valvePositionChange", "totalFlowChange", "valveDeltaPchange"], - "rules": { - "type": "set", - "itemType": "string", - "description": "Actions allowed in virtualControl mode." - } - }, - "fysicalControl": { - "default": ["statusCheck", "emergencyStop"], - "rules": { - "type": "set", - "itemType": "string", - "description": "Actions allowed in fysicalControl mode." - } - }, - "maintenance": { - "default": ["statusCheck"], - "rules": { - "type": "set", - "itemType": "string", - "description": "Actions allowed in maintenance mode." - } - } - }, - "description": "Information about valid command sources recognized by the valve." - } - }, "allowedSources":{ "default": {}, "rules": { @@ -346,26 +305,5 @@ }, "description": "Predefined sequences of states for the valveGroupControl." - }, - "calculationMode": { - "default": "medium", - "rules": { - "type": "enum", - "values": [ - { - "value": "low", - "description": "Calculations run at fixed intervals (time-based)." - }, - { - "value": "medium", - "description": "Calculations run when new setpoints arrive or measured changes occur (event-driven)." - }, - { - "value": "high", - "description": "Calculations run on all event-driven info, including every movement." - } - ], - "description": "The frequency at which calculations are performed." - } } }