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:
24
.agents/improvements/IMPROVEMENTS_BACKLOG.md
Normal file
24
.agents/improvements/IMPROVEMENTS_BACKLOG.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Improvements Backlog
|
||||
|
||||
Purpose:
|
||||
- Capture functional and architectural improvements discovered during analysis runs where functionality is not changed.
|
||||
- Keep an implementation queue outside active feature work.
|
||||
|
||||
Lifecycle:
|
||||
- Add item when discovered.
|
||||
- When implemented, remove the item from this file and record the fix in session notes/PR.
|
||||
|
||||
## Open Items (Beyond Current Top 10)
|
||||
|
||||
| ID | Date | Area | Summary | Evidence | Status |
|
||||
|---|---|---|---|---|---|
|
||||
| IMP-20260219-004 | 2026-02-19 | measurement editor | Label expression precedence can hide fallback label text. | `nodes/measurement/measurement.html:63` | open |
|
||||
| IMP-20260219-005 | 2026-02-19 | measurement editor | `success` assigned without declaration in editor save path. | `nodes/measurement/measurement.html:131` | open |
|
||||
| IMP-20260219-016 | 2026-02-19 | generalFunctions/state | `movementManager` constructor writes startup `console.log` on runtime path, adding noisy non-structured logs. | `nodes/generalFunctions/src/state/movementManager.js:16` | open |
|
||||
| IMP-20260219-018 | 2026-02-19 | generalFunctions/helper | Legacy menu endpoint still uses generated class source (`menuUtils.legacy.js`) as compatibility fallback; plan removal after UI validation of stable bootstrap/data path. | `nodes/generalFunctions/src/helper/endpointUtils.js:113`, `nodes/generalFunctions/src/helper/menuUtils.js:575` | open |
|
||||
| IMP-20260219-019 | 2026-02-19 | generalFunctions/menu | `menuUtils.js` embeds extensive runtime `console.*` and inline API/debug logging in generated client scripts, increasing noise and making prod diagnostics harder. | `nodes/generalFunctions/src/helper/menuUtils.js:35` | open |
|
||||
| IMP-20260219-020 | 2026-02-19 | generalFunctions/predict | `interpolation.js` contains raw runtime debug log (`console.log(this.interpolationtype)`), leaking internal state in production paths. | `nodes/generalFunctions/src/predict/interpolation.js:127` | open |
|
||||
| IMP-20260219-021 | 2026-02-19 | generalFunctions/menu | Two active menu utility implementations (`menuUtils.js` and `menuUtils_DEPRECATED.js`) still coexist, increasing drift risk and maintenance overhead. | `nodes/generalFunctions/src/helper/menuUtils.js:1`, `nodes/generalFunctions/src/helper/menuUtils_DEPRECATED.js:1` | open |
|
||||
| IMP-20260219-022 | 2026-02-19 | generalFunctions/outliers | `DynamicClusterDeviation.update()` emits verbose `console.log` traces on each call with no log-level guard, unsafe for production telemetry volume. | `nodes/generalFunctions/src/outliers/outlierDetection.js:7` | open |
|
||||
| IMP-20260224-006 | 2026-02-24 | rotatingMachine prediction fallback | When only one pressure side is available, predictor uses absolute pressure as surrogate differential, which can materially bias flow prediction under varying suction/discharge conditions. | `nodes/rotatingMachine/src/specificClass.js:573`, `nodes/rotatingMachine/src/specificClass.js:588` | open |
|
||||
| IMP-20260224-012 | 2026-02-24 | cross-node unit architecture | Canonical unit-anchor strategy is implemented in rotatingMachine plus phase-1 controllers (`machineGroupControl`, `pumpingStation`, `valve`, `valveGroupControl`); continue rollout to remaining nodes so all runtime paths use canonical storage + explicit ingress/egress units. | `nodes/machineGroupControl/src/specificClass.js:42`, `nodes/pumpingStation/src/specificClass.js:48`, `nodes/valve/src/specificClass.js:87`, `nodes/valveGroupControl/src/specificClass.js:78` | open |
|
||||
@@ -0,0 +1,53 @@
|
||||
# Top 10 Production Priorities (Round 2, Availability-First)
|
||||
|
||||
Context:
|
||||
- Generated after implementing the first top-10 and follow-up items `IMP-20260219-011/012/013`.
|
||||
- Focus remains: keep runtime up, prefer degraded/null outputs over hard failures.
|
||||
|
||||
## Priority List
|
||||
|
||||
1. Fix measurement outlier toggle corruption.
|
||||
- Why: toggling replaces the outlier config object with a boolean, breaking later config reads.
|
||||
- Evidence: `nodes/measurement/src/specificClass.js:509`.
|
||||
|
||||
2. Fix rotating machine pressure-difference unit request API mismatch.
|
||||
- Why: `difference('Pa')` no longer matches container API; requested unit is ignored, risking incorrect efficiency basis.
|
||||
- Evidence: `nodes/rotatingMachine/src/specificClass.js:856`, `nodes/generalFunctions/src/measurements/MeasurementContainer.js:436`.
|
||||
|
||||
3. Guard reactor PFR state indexing at boundary conditions.
|
||||
- Why: known edge behavior can overrun index mapping near exact reactor length and destabilize updates.
|
||||
- Evidence: `nodes/reactor/src/specificClass.js:326`.
|
||||
|
||||
4. Make dashboard template resolution fail-soft.
|
||||
- Why: missing template currently throws and aborts dashboard generation path.
|
||||
- Evidence: `nodes/dashboardAPI/src/specificClass.js:91`.
|
||||
|
||||
5. Make dashboard input path skip invalid children instead of throwing.
|
||||
- Why: missing child source/config currently throws; should warn and continue in availability-first mode.
|
||||
- Evidence: `nodes/dashboardAPI/src/nodeClass.js:55`.
|
||||
|
||||
6. Harden shared config merge semantics for arrays/types.
|
||||
- Why: recursive merge mutates destination and treats arrays as objects, risking config drift.
|
||||
- Evidence: `nodes/generalFunctions/src/helper/configUtils.js:77`.
|
||||
|
||||
7. Fix machineGroupControl child position source path.
|
||||
- Why: reads `positionVsParent` from `general` instead of `functionality`, causing inconsistent routing metadata.
|
||||
- Evidence: `nodes/machineGroupControl/src/specificClass.js:53`.
|
||||
|
||||
8. Accept numeric-string measurement payloads safely.
|
||||
- Why: measurement node currently ignores numeric strings common in PLC/edge integrations.
|
||||
- Evidence: `nodes/measurement/src/nodeClass.js:167`.
|
||||
|
||||
9. Fix reactor editor save wiring mismatch.
|
||||
- Why: editor save hook references the wrong node helpers, risking mis-saved position settings.
|
||||
- Evidence: `nodes/reactor/reactor.html:133`.
|
||||
|
||||
10. Replace raw `structuredClone` usage with compatibility-safe clone strategy.
|
||||
- Why: runtime portability risk across constrained Node-RED deployments.
|
||||
- Evidence: `nodes/settler/src/specificClass.js:34`, `nodes/settler/src/specificClass.js:45`.
|
||||
|
||||
## Implementation Status
|
||||
|
||||
- Implemented on 2026-02-19 in current session.
|
||||
- Verification: tests passed for `generalFunctions`, `measurement`, `reactor`, `rotatingMachine`, `dashboardAPI`, `machineGroupControl`, `settler`, `pumpingStation`, `valve`, `valveGroupControl`, `monster`.
|
||||
- Follow-up architectural items are tracked in `.agents/improvements/IMPROVEMENTS_BACKLOG.md`.
|
||||
@@ -0,0 +1,63 @@
|
||||
# Top 10 Production Priorities (Availability-First)
|
||||
|
||||
Context:
|
||||
- Scope reviewed: all nodes under `nodes/*` plus shared `nodes/generalFunctions/*`.
|
||||
- Target posture: keep runtime alive; emit `null`/degraded outputs instead of crashing.
|
||||
|
||||
## Priority List
|
||||
|
||||
1. Remove import-time executable code from machine group runtime module.
|
||||
- Why: `makeMachines()` runs at module load and can execute demo logic in production runtime.
|
||||
- Evidence: `nodes/machineGroupControl/src/specificClass.js:1294`, `nodes/machineGroupControl/src/specificClass.js:1399`.
|
||||
- Availability target: no side effects on `require`; test/demo code must be isolated from runtime path.
|
||||
|
||||
2. Guard `registerChild` in node wrappers to prevent null dereference crashes.
|
||||
- Why: multiple wrappers dereference `childObj.source` without checking child existence.
|
||||
- Evidence: `nodes/reactor/src/nodeClass.js:54`, `nodes/settler/src/nodeClass.js:39`, `nodes/valve/src/nodeClass.js:256`, `nodes/valveGroupControl/src/nodeClass.js:178`, `nodes/machineGroupControl/src/nodeClass.js:215`.
|
||||
- Availability target: if child missing, log warning and continue.
|
||||
|
||||
3. Harden shared child registration utility contract checks.
|
||||
- Why: shared helper destructures `child.config.*` without validation.
|
||||
- Evidence: `nodes/generalFunctions/src/helper/childRegistrationUtils.js:9`, `nodes/generalFunctions/src/helper/childRegistrationUtils.js:10`.
|
||||
- Availability target: reject invalid child payload with warning, no throw.
|
||||
|
||||
4. Add global input-handler error boundary pattern across nodes.
|
||||
- Why: many handlers do work without `try/catch`; one thrown error can bubble and destabilize node behavior.
|
||||
- Evidence: `nodes/measurement/src/nodeClass.js:156`, `nodes/valve/src/nodeClass.js:250`, `nodes/valveGroupControl/src/nodeClass.js:169`, `nodes/settler/src/nodeClass.js:32`.
|
||||
- Availability target: wrap topic routing; map failures to warning + safe `done(err)`/`done()` handling.
|
||||
|
||||
5. Normalize `done` callback handling for Node-RED compatibility.
|
||||
- Why: several nodes call `done()` unguarded; older/inconsistent runtime callbacks can fail.
|
||||
- Evidence: `nodes/measurement/src/nodeClass.js:167`, `nodes/valve/src/nodeClass.js:280`, `nodes/valveGroupControl/src/nodeClass.js:201`, `nodes/machineGroupControl/src/nodeClass.js:257`.
|
||||
- Availability target: `if (typeof done === 'function') done();` everywhere.
|
||||
|
||||
6. Fix reactor runtime routing and setup defects.
|
||||
- Why: `Temperature` topic routes to missing setter path and default reactor warning references wrong variable.
|
||||
- Evidence: `nodes/reactor/src/nodeClass.js:46`, `nodes/reactor/src/nodeClass.js:140`.
|
||||
- Availability target: unknown/unsupported control topics fail soft with warning; setup path cannot throw from bad references.
|
||||
|
||||
7. Fix valve mode-selection bug using undefined config source.
|
||||
- Why: `setMode` references `defaultConfig` instead of instance config; can throw or silently break mode changes.
|
||||
- Evidence: `nodes/valve/src/specificClass.js:142`.
|
||||
- Availability target: invalid mode inputs are rejected safely, valid mode changes deterministic.
|
||||
|
||||
8. Replace hard-throw chain semantics in measurement container with safe-return options.
|
||||
- Why: chain API currently throws for sequence misuse; upstream callers can crash control loops.
|
||||
- Evidence: `nodes/generalFunctions/src/measurements/MeasurementContainer.js:99`, `nodes/generalFunctions/src/measurements/MeasurementContainer.js:109`.
|
||||
- Availability target: invalid chain usage logs and returns no-op/null path in production mode.
|
||||
|
||||
9. Remove noisy console/debug/test logging from runtime paths.
|
||||
- Why: heavy `console.log/error` in control and shared code adds noise and can hide real failures.
|
||||
- Evidence: `nodes/reactor/src/nodeClass.js:58`, `nodes/measurement/src/nodeClass.js:90`, `nodes/pumpingStation/src/nodeClass.js:87`, `nodes/valve/src/specificClass.js:207`.
|
||||
- Availability target: use structured logger with levels; disable debug by default.
|
||||
|
||||
10. Standardize output contract for unchanged state to explicit `null` output.
|
||||
- Why: `formatMsg` returns `undefined` when no change; behavior differs by node send implementation.
|
||||
- Evidence: `nodes/generalFunctions/src/helper/outputUtils.js:37`, `nodes/generalFunctions/src/helper/outputUtils.js:62`.
|
||||
- Availability target: unchanged outputs always return `null` to keep port contract deterministic.
|
||||
|
||||
## Implementation Status
|
||||
|
||||
- Implemented on 2026-02-19 in current session.
|
||||
- Verification: node test suites passed for modified runtime nodes (`measurement`, `reactor`, `valve`, `valveGroupControl`, `machineGroupControl`, `settler`, `pumpingStation`, `dashboardAPI`, `monster`, `rotatingMachine`).
|
||||
- Remaining follow-up items are tracked in `.agents/improvements/IMPROVEMENTS_BACKLOG.md`.
|
||||
Reference in New Issue
Block a user