fix(occupancy): a holiday passed with no frozen record still splits the readers #246

Open
opened 2026-10-03 08:47:09 +00:00 by gabogg · 0 comments
Owner

P3 follow-up from PR #178 review pass 4 (spec axis). Plausible, not reproduced.

Finding

Decision 1 (2026-10-02) says: "There must be one source of holiday identity, not two that can disagree." One narrow gap remains:

  • Scenario: the monitor is down for the whole holiday, so monitor_service.py:114 never freezes the day. Calibration history for that day is backfilled later.
  • The readers disagree:
    • The calibration schedule fallback (occupancy_service.py ~565-590) reads occupancy_holidays and says holiday.
    • Learning (occupancy_repository.py ~2842) and the spike reference (~3135) read only the business-day records, so they count the day as ordinary.

Acceptance Criteria

  • Reproduce the scenario in a test (missed freeze, then backfill).
  • Close the gap: stamp the day when history first lands for it, or make every reader resolve through the same path. All readers then agree the day is a holiday.
P3 follow-up from PR #178 review pass 4 (spec axis). Plausible, not reproduced. ### Finding Decision 1 (2026-10-02) says: "There must be one source of holiday identity, not two that can disagree." One narrow gap remains: - **Scenario:** the monitor is down for the whole holiday, so `monitor_service.py:114` never freezes the day. Calibration history for that day is backfilled later. - **The readers disagree:** - The calibration schedule fallback (`occupancy_service.py` ~565-590) reads `occupancy_holidays` and says holiday. - Learning (`occupancy_repository.py` ~2842) and the spike reference (~3135) read only the business-day records, so they count the day as ordinary. ### Acceptance Criteria - Reproduce the scenario in a test (missed freeze, then backfill). - Close the gap: stamp the day when history first lands for it, or make every reader resolve through the same path. All readers then agree the day is a holiday.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gabogg/hikcentral#246
No description provided.