Some checks failed
CI / lint-and-test (push) Has been cancelled
Adds the _dispatchInFlight gate that mirrors rotatingMachine state.delayedMove. Before this, PS at 1 Hz overran in-flight pump ramps via concurrent handleInput entries, producing the live thrash: 120 aborts / 2 min, pump_b clamped at minFlow. Includes regression test: test/mgc-overactive-demand-serialization.integration.test.js covering concurrent-burst serialization (30 calls → ≤ 5 aborts) and latest-wins semantic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EVOLV cross-node test harness
This folder hosts end-to-end tests that wire multiple EVOLV domain classes together the same way Node-RED would, but in pure Node.js so the simulation runs deterministically and every internal value is inspectable.
Scope rule. Tests that exercise a single node's behaviour live in that
node's submodule under nodes/<name>/test/. Tests here cross node
boundaries — they instantiate pumpingStation + machineGroupControl +
multiple rotatingMachines together and drive the wired graph.
Examples of what belongs where:
| Concern | Lives in |
|---|---|
| MGC optimizer combination choice for a given demand | nodes/machineGroupControl/test/integration/optimizer-combination-choice.integration.test.js |
| Pump curve interpolation across head values | nodes/rotatingMachine/test/integration/... |
| PS hysteresis logic with mocked groups | nodes/pumpingStation/test/integration/shifted-ramp-end-to-end.test.js |
| Whole plant: PS basin level + MGC dispatch + 3 pumps + physics simulator | test/end-to-end-pumpingstation.test.js (this folder) |
Run:
node --test test/end-to-end-pumpingstation.test.js
The harness in lib/wiring.js builds the parent-child relationships
Node-RED would build via registerChild, lets you advance a controllable
clock, and lib/recorder.js records every measurement / state / demand
event into a flat trace.