refactor(occupancy): consolidate multiplier re-evaluation pipeline between service and callback #253
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#253
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-4 review finding P3-6:
Scope
In
app/services/occupancy_service.py,_reeval_callback(~786) andrefresh_active_multiplier_async(~1613) repeat the identical pipeline: seed retrieval, trusted calibration history, sorting, EWMA weighting with gamma 0.25, variance calculation, and configuration persistence.The two copies have already drifted: one writes
last_calibrated_atin the repository while the other writesupdated_at.Acceptance Criteria
aiosqlite.Connection).Refs #177, #114.