mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
dispatch() (LOADED -> DISPATCHED) routed through the shared transition() helper, which only flipped status/timestamp and never called applyCapacityDelta. deliver() (import pickup) already decrements correctly, so export cargo leaving by train inflated currentWeight/ currentVolume/currentContainers forever instead of freeing capacity. Add optional freeCapacity hook to transition(), wire dispatch() to it, mirroring the negative-delta pattern already used in deliver().