Files
hermes-agent/cron
teknium1 e85291e27b fix(cron): measure hold, retry, resume and alert windows in real time across the fall-back hour
Same class as the due-scan fix: the configured zone is one cached ZoneInfo, so two aware
datetimes in it compare and subtract by wall clock, and aware + timedelta is wall-clock
arithmetic that drops fold. Inside the repeated 01:xx hour:

- unreachable_retry.plan_retry: now(01:30 EST) + 300s landed on 01:35 EDT, 55 min in the
  past, so the "re-run in 5 min" fired on the next tick.
- quota_hold: the provider-window end was an hour off (hold too long, or already expired)
  and hold_active compared wall clocks.
- resume_job: the "slot elapsed while paused" check compared wall clocks and could drop
  the kept slot (#113603 path).
- _repeat_alert_withheld: the repeat-alert window was measured in wall time.

Add jobs._seconds_after (UTC add, back to the caller's zone) next to the instant helpers
and use the instant comparisons there. Found by the C13 virtual-clock cron soak.
2026-09-23 10:37:15 -07:00
..