perf(planning): reject impossible mandatory moves before copying

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nessarandClaude Opus 5.5 committed 2026-10-16 22:04:28 +02:00
1 parent 433a8b0ade
commit c6610cd633
3 files changed
+104

No files matched your search

+2
View File
@@ -1514,6 +1514,8 @@ function assignDateToBalance(
) {
return null;
}
// Reject impossible mandatory moves before copying; validate complete patterns later.
if (!mandatoryRelocationDate(date, balance, ruleIds, context)) return null;
// Existing placements stay read-only; this assignment owns only its new placement.
const result = cloneState(state, new Map(state.placements));
const target = result.balances.find((item) => item.id === balanceId)!;