refactor(occupancy): move OFFSET calculation to service layer, align reset window, and include pending_offset #230
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#230
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?
Follow-up for PR #177 (next-day settings activation, #114) addressing pass-3 review findings P3-G, P3-L, and P3-M:
Scope
occupancy_repository.py), violating architectural boundaries (§1.3) by placing domain mathematics in persistence. Move the computation intooccupancy_service.pyand replace the fallback magic number8with configuredpatrol_guard_count.effective_boundary_epoch. If a reset change for the same day is also pending (e.g. 04:00 -> 03:00), the window differs, causing counts in the transition window (03:00–04:00) to be missed. Measure from the adjusted cycle boundary.pending_offsetin the pending activation notice is currently alwaysNonefor OFFSET changes. Populate it with the expected target/offset value.Acceptance Criteria
occupancy_repository.py.pending_offsetvalue.Refs #177, #114.