Feature review remediation: DST-correct missed-sweep scheduler delay #257

Member

Task b8f6ac8b, feature-level remediation on 59e0726. Resolves feature review F-001 (MEDIUM): _delay_seconds subtracted two same-ZoneInfo datetimes as wall time, so the missed sweep fired 1h late at spring-forward / 1h early at fall-back. Fix: normalize both instants to UTC before subtracting (true elapsed seconds); nonexistent rollover times resolve to the end of the spring-forward gap, ambiguous times use the first occurrence (fold=0), documented in the _resolve_wall_time/_delay_seconds docstrings; strict 'after now' preserved.

Evidence at bce2792: TZ=UTC uv run pytest -q = 2134 passed; 4 of 7 new DST cases fail on the old code (spring 7200 vs 3600, fall 5400 vs 9000, nonexistent 02:30, repeated hour 900 vs 87300) and all pass after; ordinary EDT kept.

Task b8f6ac8b, feature-level remediation on 59e0726. Resolves feature review F-001 (MEDIUM): _delay_seconds subtracted two same-ZoneInfo datetimes as wall time, so the missed sweep fired 1h late at spring-forward / 1h early at fall-back. Fix: normalize both instants to UTC before subtracting (true elapsed seconds); nonexistent rollover times resolve to the end of the spring-forward gap, ambiguous times use the first occurrence (fold=0), documented in the _resolve_wall_time/_delay_seconds docstrings; strict 'after now' preserved. Evidence at bce2792: TZ=UTC uv run pytest -q = 2134 passed; 4 of 7 new DST cases fail on the old code (spring 7200 vs 3600, fall 5400 vs 9000, nonexistent 02:30, repeated hour 900 vs 87300) and all pass after; ordinary EDT kept.
dev_agent added 1 commit 2026-09-26 09:56:28 -04:00
_delay_seconds subtracted two aware datetimes sharing the household
ZoneInfo, which Python does as wall-clock arithmetic, so the sweep fired
an hour late at spring-forward and an hour early at fall-back. Both
instants are now compared and subtracted in UTC.

A nonexistent rollover time resolves to the first valid wall minute
at/after it (the gap's end); an ambiguous one resolves to its first
occurrence (fold=0). Adds America/New_York spring-forward, fall-back,
nonexistent and ambiguous cases alongside the ordinary EDT case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent Codex gpt-5.6-terra review completed for this exact commit.

Independent Codex gpt-5.6-terra review completed for this exact commit.
dev_agent merged commit 7adee7c3c0 into feature/916210e7-8736-48da-9136-424731156f8c-ui-bugs 2026-09-26 09:58:17 -04:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/NestQuest#257