feat(schedule): each business day remembers the schedule it was measured under #113
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#113
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?
Problem
Only the current weekly schedule is stored (
occupancy_daily_schedule: one row per weekday, overwritten on edit). Anything that looks at a past business day (Closed Days #103, open-window Mean Dwell, dayparts, the Usual Weekday Baseline's matching-hours rule #105) resolves that day with today's schedule. The first schedule edit silently rewrites history:Dated exceptions (
occupancy_holidays) are date-specific. Production has not edited its schedule since counting started (2026-09-03), so nothing is wrong yet.Decisions (maintainer, 2026-09-25)
WEEKLY,EXCEPTION,STAMPED,MANUAL, plus room for anIMPORTEDsource, see 6), and the exception name when there was one (e.g. holiday name).daily_reset_timere-cuts history.sourcefield shows the admin which days are real history.IMPORTED) for days before counting started and may mark past holidays; records can exist for any date, not only days with counted data.get_active_schedule_info_async/ScheduleCalendar(#110) so there is one rule app-wide.Acceptance
Related: #103 (Closed Day), #105 (baseline matches opening hours), #108 (schedule exceptions naming), #109 (Closed Day calibration), #111 (
ScheduleCalendarplacement).🤖 Generated with Claude Code
Implementation note from the #122 review: once per-day schedule records exist, switch these call sites to prefer the day record:
ScheduleCalendar.opening_hours(day)(Usual Weekday Baseline's same-opening-hours rule, #105)ScheduleCalendar.is_closed(day)(Closed Days, #103)OccupancyManager.get_active_schedule_info_async(live schedule; uses the sameopening_hours_by_schedule/is_open_by_schedulerules)Until then the hours rule only excludes days when the target day is a dated exception with its own hours, because every regular candidate resolves to today's weekday hours.
🤖 Generated with Claude Code
gabogg referenced this issue2026-09-27 23:39:54 +00:00
gabogg referenced this issue2026-09-28 00:13:46 +00:00
gabogg referenced this issue2026-09-28 09:00:59 +00:00
gabogg referenced this issue2026-09-28 10:27:39 +00:00