Sanitized functional diff
baseline: 576f1a71bbc57e60b71c38d8146a41b212eca32d
functional revision: d7980d74b0e69ad85e4f11e200f667f66b54f3ce
--- accepted baseline live generator
+++ recorded live generator
@@
-temperatureC: round(24.2 + Math.sin(phase) * 1.5), thresholdC: 32,
+temperatureC: round(24.2 + Math.sin(phase) * 1.5), thresholdC: 30,
The CNC teaching limit is deliberately aligned with the retained validation
lesson before the margin is derived. Other station limits are unchanged.
--- accepted baseline Node-RED response Function
+++ recorded Comfort margin response Function
@@
-snapshot.stations = Object.values(byId).map((station) => ({
- ...station,
- ageMs: Math.max(0, now - Date.parse(station.observedAt))
-}));
+snapshot.stations = Object.values(byId).map((station) => {
+ const validTemperature = Number.isFinite(station.temperatureC);
+ const comfortMargin = validTemperature
+ ? Number((station.thresholdC - station.temperatureC).toFixed(1))
+ : null;
+ return {...station, comfort_margin_c: comfortMargin,
+ ageMs: Math.max(0, now - Date.parse(station.observedAt))};
+});
+const primary = snapshot.stations.find((station) => station.id === 'cnc-cell');
+snapshot.configured_demo_temperature_limit_c = primary.thresholdC;
+snapshot.validated_temperature_c =
+ Number.isFinite(primary.temperatureC) ? primary.temperatureC : null;
+snapshot.comfort_margin_c = primary.comfort_margin_c;
--- accepted baseline validation response
+++ recorded validation response
@@
-if (![22,34].includes(raw)) reject();
+if (![22,30,34].includes(raw)) reject();
@@
+validated_temperature_c: temperature,
+configured_demo_temperature_limit_c: 30,
+comfort_margin_c: Number((30 - temperature).toFixed(1)),
--- accepted baseline dashboard
+++ recorded dashboard
@@
+Comfort margin
+—
The complete machine-readable after-state is linked as flows.json, app.js,
telemetry.schema.json and the reproducible release archive. This focused diff
omits JSON formatting-only changes and private operational context.