yiekheng 6942745085 test(bot): cover the reschedule corner case in scheduleReminderFire
Lock down the pre-send cancel that fixed the dropped 8:20 PM fire:

  - cancel UPDATE always runs BEFORE boss.send (regression: stately
    dedupe silently rejected the new send when a stale created job
    existed; now we tombstone the stale row first)
  - cancel scopes to state='created' only (active and completed jobs
    must survive — they're in-flight or historical)
  - cancel filters by THIS reminder's singletonKey (no cross-reminder
    cancellation)
  - boss.send still receives singletonKey + startAfter + retryLimit
  - first-time schedule (zero stale rows) still calls send
  - cancel UPDATE error degrades to "send anyway" — the handler-level
    recent-run dedupe will catch any duplicate that lands
  - boss.send returning null is surfaced (so the caller's logger
    captures jobId: null instead of silently treating it as success)

77 bot tests now (was 70).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 20:33:29 +08:00
..