]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(atg): invalidate configurationValidationResult on ChargingStationEvents.updated...
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 8 Jul 2026 12:45:52 +0000 (14:45 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2026 12:45:52 +0000 (14:45 +0200)
commit56479e44db4a670d9bcffbfb4ce351c5048f50d5
tree7ef0a6dbc328bbf8fe6862c3fdfa932e78d56bbf
parentc55793e9da082ac610134f696f1d5b170d2b6a94
fix(atg): invalidate configurationValidationResult on ChargingStationEvents.updated (#1977)

Subscribe to ChargingStationEvents.updated in AutomaticTransactionGenerator's
constructor so in-flight configuration mutations that reach any charging
station mutation emit cannot leave a stale memoized validation decision
behind. stop() still clears the cache as a redundant safety net.

deleteInstance unsubscribes the handler before removing the entry so the
retired instance is not retained via the charging station's listener array
across a getInstance/deleteInstance churn cycle.

Fixes #1965.
src/charging-station/AutomaticTransactionGenerator.ts
tests/charging-station/AutomaticTransactionGenerator.test.ts
tests/charging-station/helpers/StationHelpers.factory.ts