Eve-phase schemes are never pushed: the night before an event resolves as a no-event night #163
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
security
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#163
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
With the eve phase enabled (globally via
EVE_PHASE_ENABLED, or per event), the night before an event should show that event'sevescheme. It never does.priority_resolver.get_events_for_dateselects candidates withEvent.start <= target_date <= Event.end. The eve night isevent.start - 1, which fails that filter, so the night resolves as a no-event night and pushes the no-event default.phase_resolver.resolve_phasedoes handletarget_date == event.start - timedelta(days=1), but its docstring says the "caller must ensure target_date is in [event.start-1 (if eve), event.end]", and no caller does.It affects every path that resolves a night:
Found while building the shared day-plan resolver in #162.
Fix
target_date(Event.start == target_date + 1) when eve is enabled for that event, globally or per event.resolve_active.get_events_for_date, so the day plan, the calendar and "Push now" all pick it up at once.Eve is off by default, which is presumably why nobody has seen this.