Files
EVOLV/.agents/decisions/DECISION-20260224-unit-anchor-rollout-phase1-machinegroup-pumping-valves.md
znetsixe 6a6c04d34b Migrate to new Gitea instance (gitea.wbd-rd.nl)
- Update all submodule URLs from gitea.centraal.wbd-rd.nl to gitea.wbd-rd.nl
- Add settler as proper submodule in .gitmodules
- Add agent skills, function anchors, decisions, and improvements
- Add Docker configuration and scripts
- Add manuals and third_party docs
- Update .gitignore with secrets and build artifacts
- Remove stale .tgz build artifact

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:07:04 +01:00

38 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Decision: Unit-Anchor Rollout Phase 1 (MachineGroup, PumpingStation, Valve, ValveGroupControl)
- Date: 2026-02-24
- Scope:
- `nodes/machineGroupControl/src/nodeClass.js`
- `nodes/machineGroupControl/src/specificClass.js`
- `nodes/pumpingStation/src/nodeClass.js`
- `nodes/pumpingStation/src/specificClass.js`
- `nodes/valve/src/nodeClass.js`
- `nodes/valve/src/specificClass.js`
- `nodes/valveGroupControl/src/nodeClass.js`
- `nodes/valveGroupControl/src/specificClass.js`
## Context
After adopting canonical-unit anchoring in `rotatingMachine`, adjacent controller nodes still mixed local units, unitless writes, and implicit conversions. That left cross-node behavior sensitive to registration order and source-unit assumptions.
## Decision
1. Apply the same canonical storage policy per node:
- internal storage in canonical units (`Pa`, `m3/s`, `W`, `K` where relevant),
- preferred/output units for operator-facing status and output payloads.
2. Enable strict measurement ingress discipline on migrated nodes:
- `strictUnitValidation: true`,
- `throwOnInvalidUnit: true`,
- required unit for physically dimensional types (`flow`, `pressure`, `power`, `temperature`, and node-specific equivalents).
3. Replace unitless runtime writes/reads with explicit-unit helpers in each nodes domain class, including child-machine/child-valve interactions.
## Consequences
- Cross-node calculations now run against a deterministic unit anchor in phase-1 nodes.
- Status/output values remain in preferred/output units, while internal math stays canonical.
- Legacy paths that send dimensional values without units now fail fast instead of silently coercing.
## Rollback Notes
- Revert the eight files listed in scope.
- Restore previous `MeasurementContainer` initialization (non-canonical, non-strict behavior) in each node.
- Remove helper-based explicit unit reads/writes and revert to prior direct chain usage.