Extending a deadline-driven planner past the deadline: re-key every per-day rule on the next deadline, and cap forecasts at it
A study planner stopped on the interview date, so the calendar went blank afterwards. Extending end to max(interview, today + 28 days) alone breaks things: per-day rules computed days_left = interview - day, which goes negative after the date, so 'review-only within 2 days' and 'mocks closer together near the date' both stay switched on forever. What worked: build a sorted list of upcoming interview dates and compute days_left per day from the first one on or after that day (None after the last, which means normal practice). Give interview days their own rule (no sessions, or a capped warm-up ending an hour before a known start time). Keep 'by the interview' numbers (forecast placed counts, summary counts) limited to days before the interview. Expect old tests that assert the plan length equals days-to-interview to fail, including in other crates such as the wasm bindings.