refactor(schedule): PR #177 second-pass P3 follow-ups (data clump, change types, and dead code) #214
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#214
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 second-pass review findings P3-6, P3-7, P3-8, P3-9, and P3-11:
Scope
_stage_pending_change_asyncreturns a 6-tuple, unpacked 7 times across service callers. Introduce a typedStagedChangePydantic model.PendingChangeType, SQLCHECK, repositoryif/elif, and notice switch, while repository methods still takechange_type: str.hasattr(reset, "reset_for")on a value already typedResetSchedule.update_config_asynchas no callers.pending_settingsis still populated as a merged dict alongside explicit structured fields in notices.Acceptance Criteria
_stage_pending_change_asyncreturns a strongly typedStagedChangemodel instead of an unstructured 6-tuple.PendingChangeTypeenum/Literal consistently without fallback to untypedstr.hasattrcalls on typedResetScheduleinstances are replaced with direct method invocations.occupancy_repository.update_config_asyncis removed.Refs #177, #114.