mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-18 14:07:27 +02:00
In working-days mode the reverse anchor is not the inverse of the forward anchor when the predecessor's anchor falls on a non-working day: fsAnchor(Sat) = Mon, but fsReverseAnchor(Mon) = Fri. The reverse pass of simulateCascade only compared the reverse anchor against the predecessor, so after an FS push that left a successor ending on a Saturday, the next link in the chain pulled that successor back by the calendar delta. The pulled issue then started on its own predecessor's last day, and that upstream link was never re-checked because the primary edit is guarded. Check the violation with the forward anchor (the same predicate the outgoing pass uses) before pulling. Legacy calendar-day mode is unaffected because its forward and reverse anchors are exact inverses. Tests cover the reported chain (A -> B -> C across a weekend), a successor dropped on the first working day after a Saturday-ending predecessor, a real violation that must still pull, and legacy-mode regressions. Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>