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>
This commit is contained in:
znetsixe
2026-03-04 21:07:04 +01:00
parent fbd9e6ec11
commit 6a6c04d34b
169 changed files with 21332 additions and 1512 deletions

View File

@@ -0,0 +1,45 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Measurement Anchor Topology</title>
<style>
body { font-family: Arial, sans-serif; margin: 24px; color: #1f2937; background: #f7f8fa; }
.card { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.topic { font-family: monospace; color: #0f52a5; }
ul { margin: 8px 0 0 20px; }
</style>
</head>
<body>
<h1>Measurement Function Anchor</h1>
<div class="card">
<h2>Topology</h2>
<ul>
<li><strong>Node:</strong> <code>measurement</code></li>
<li><strong>Runtime:</strong> <code>nodes/measurement/src/nodeClass.js</code></li>
<li><strong>Domain:</strong> <code>nodes/measurement/src/specificClass.js</code></li>
<li><strong>Admin endpoints:</strong> <code>/measurement/menu.js</code>, <code>/measurement/configData.js</code>, <code>/measurement/asset-reg</code></li>
</ul>
</div>
<div class="card">
<h2>Input Topics</h2>
<ul>
<li><span class="topic">measurement</span> -> set input value when payload is numeric</li>
<li><span class="topic">simulator</span> -> toggle simulation mode</li>
<li><span class="topic">outlierDetection</span> -> toggle outlier mode flag</li>
<li><span class="topic">calibrate</span> -> run calibration logic</li>
</ul>
</div>
<div class="card">
<h2>Output Ports</h2>
<ul>
<li>Port 0: process message</li>
<li>Port 1: influx message</li>
<li>Port 2: parent registration (<code>registerChild</code>)</li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,53 @@
# Measurement Function Anchor (Preparation Baseline)
## 0) Connection Map (At a Glance)
- **Node type**: `measurement` (`nodes/measurement/measurement.js:1`, `nodes/measurement/measurement.html:14`)
- **Consumes topics**: `measurement`, `simulator`, `outlierDetection`, `calibrate` (`nodes/measurement/src/nodeClass.js:147`)
- **Publishes periodic outputs**:
- Output `0`: process payload (`nodes/measurement/src/nodeClass.js:137`)
- Output `1`: influx payload (`nodes/measurement/src/nodeClass.js:138`)
- Output `2`: parent registration (`registerChild`) (`nodes/measurement/src/nodeClass.js:118`)
- **Cross-node integrations (direct observed)**:
- Registers as child to parent with `positionVsParent` and optional `distance` (`nodes/measurement/src/nodeClass.js:118`)
- Emits measurement updates through `MeasurementContainer` in `specificClass` (`nodes/measurement/src/specificClass.js:479`)
- **Admin/UI endpoints**:
- `GET /measurement/menu.js` (`nodes/measurement/measurement.js:23`)
- `GET /measurement/configData.js` (`nodes/measurement/measurement.js:33`)
- `POST /measurement/asset-reg` (`nodes/measurement/measurement.js:43`)
## 1) Unit Table (Initial Baseline)
| Signal/Field | Represents | Default Unit | Source of Truth | Produced By | Consumed By | Fallback/Degraded Behavior |
|---|---|---|---|---|---|---|
| `inputValue` | raw measurement input | asset-dependent | `nodes/measurement/src/specificClass.js:30` | `measurement` topic or simulator | scaling/smoothing pipeline | defaults to `0` |
| `outputAbs` (`mAbs`) | processed absolute output | `config.asset.unit` | `nodes/measurement/src/specificClass.js:472` | `updateOutputAbs()` | process/influx outputs + event emitter | constrained to configured abs range |
| `outputPercent` (`mPercent`) | normalized percent-like output | `%` semantic | `nodes/measurement/src/specificClass.js:483` | `updateOutputPercent()` | process/influx outputs | interpolated from abs range or observed min/max |
| `storedValues` | smoothing window values | same as processed value | `nodes/measurement/src/specificClass.js:24` | `applySmoothing()` | smoothing and repeatability checks | capped to `smoothWindow` length |
| `simulation.enabled` | internal simulated signal mode | boolean | `nodes/measurement/src/specificClass.js:52` | config/topic toggle | `tick()` behavior | off by default |
## 2) Class Identity
- **Runtime registration + endpoints**: `nodes/measurement/measurement.js`
- **Node-RED wrapper/routing**: `nodes/measurement/src/nodeClass.js`
- **Domain measurement logic**: `nodes/measurement/src/specificClass.js`
- **Editor UI/defaults**: `nodes/measurement/measurement.html`
## 3) Current Gaps To Resolve Before Declaring Anchor Complete
1. Node label precedence can hide fallback text due to expression order:
- `return this.positionIcon + " " + this.assetType || "Measurement";` (`nodes/measurement/measurement.html:63`)
2. `success` variable is assigned without declaration in editor save path:
- `success = window.EVOLV.nodes.measurement.assetMenu.saveEditor(this);` (`nodes/measurement/measurement.html:131`)
3. `toggleOutlierDetection()` mutates config object to boolean:
- `this.config.outlierDetection = !this.config.outlierDetection;` (`nodes/measurement/src/specificClass.js:503`)
4. Input handler ignores numeric strings for `measurement` topic:
- accepts only `typeof msg.payload === 'number'` (`nodes/measurement/src/nodeClass.js:152`)
## 4) Standardization Plan (Mirror RotatingMachine)
1. Keep this anchor pair (`.md` + `.html`) and evidence file maintained with behavior changes.
2. Maintain test layout under `nodes/measurement/test/`:
- `basic/`, `integration/`, `edge/`, `helpers/`
3. Maintain examples package under `nodes/measurement/examples/`:
- `README.md`, `basic.flow.json`, `integration.flow.json`, `edge.flow.json`
## 5) Acceptance Criteria For Completion
- Required anchor artifacts exist and map to current behavior.
- Test suite runs with node-level command.
- Example flow files exist and pass flow-structure tests.

View File

@@ -0,0 +1,32 @@
# Measurement Test Evidence
Status: baseline suite created and executed.
## Required Test Layout
- `nodes/measurement/test/basic/*.test.js`
- `nodes/measurement/test/integration/*.test.js`
- `nodes/measurement/test/edge/*.test.js`
- `nodes/measurement/test/helpers/*.js`
## Test-to-Contract Mapping
| Test file | Scope | Primary contracts anchored |
|---|---|---|
| `nodes/measurement/test/basic/specific-constructor.basic.test.js` | constructor baseline and range derivation | `Measurement` constructor |
| `nodes/measurement/test/basic/scaling-and-output.basic.test.js` | scaling constraint and output update path | `calculateInput`, `updateOutputAbs`, `getOutput` |
| `nodes/measurement/test/basic/nodeclass-routing.basic.test.js` | topic routing and registration output shape | `nodeClass._attachInputHandler`, `_registerChild` |
| `nodes/measurement/test/integration/examples-flows.integration.test.js` | example package integrity and expected topic drivers | `nodes/measurement/examples/*.flow.json` |
| `nodes/measurement/test/integration/measurement-event.integration.test.js` | measurement container event emission contract | `updateOutputAbs`, measurement emitter wiring |
| `nodes/measurement/test/edge/invalid-payload.edge.test.js` | non-numeric input payload ignored behavior | `nodeClass._attachInputHandler` measurement branch |
| `nodes/measurement/test/edge/outlier-toggle.edge.test.js` | current outlier toggle behavior capture | `toggleOutlierDetection` |
## Executed
- Command:
- `cd nodes/measurement && npm test`
- Result:
- `pass: baseline suite` (see latest run in session)
- Date:
- February 19, 2026
## Known Gaps Captured by Tests
- Outlier toggle currently converts config object to boolean.
- Measurement topic currently ignores numeric strings.