Support needs to preview a reminder batch before the scheduled job sends it. Each notice contains an account ID and daysLeft. Preview and delivery share the same planner, but preview must leave the delivery log alone.
Refreshing a preview records another delivery even though nobody asked to send anything.
Reproduce
Run the sample preview for the account ending on day 42 at day 40. It should return near:2 and leave sent empty. The starter records near as sent.
Acceptance criteria
- Preview returns the ordered notice plan without recording sends.
- Explicit delivery returns the same plan and appends each selected account ID once to sent.
- Repeated previews do not add sends; a later explicit delivery still does.
- Retain selection bounds, supplied-day behavior and input preservation.
Notes
- Inputs are already validated: unique nonempty account IDs, whole day indices from 0 to 10000, and a reminder window from 0 to 30. The service has already chosen its calendar convention; do not parse dates or read a clock.
- An account is due when 0 ≤ endsOn − today ≤ window, including expiry day. Keep input order and leave supplied records unchanged.
- The sent list is a local delivery stand-in, not an email service. Each case creates fresh state; all requests inside that case use one service. Sending twice is two explicit sends, not deduplication.
- Keep the supplied entry points and data fields. Alternate loops and helpers are welcome. The checks observe outputs, input preservation and the supplied sent list; they cannot prove arbitrary code has no other side effects.