refactor(occupancy): PR #68 review follow-ups — sync method size, ingestion flag and anomaly-kind types, cold-start labelling #75
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#75
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?
Code quality
sync_passenger_flow_from_artemis_asyncis ~210 lines (polling, reset detection, drift, gap reconstruction, persistence). Split into per-group reconciliation helpers. Deferred since round 2 because it touched all four stacked branches.OccupancyManager.get_ingestion_anomalies_asyncis a thin pass-through to the repository. Keep as the service API or inline, but decide explicitly.{"FLAG_INGESTION_GAP", "FLAG_INGESTION_STALLED"}appears twice without usingCalibrationAnomalyFlag. One module-level set of enum members.group_code="*"is written in the service and hardcoded again inextend_ingestion_stall_async. Name it once.Literal["reset", "stall", "gap"]in the repository and the schema, plus the SQLCHECK. OneIngestionAnomalyKindalias.PassengerFlowReading(...)construction in the reset and normal branches.STALL_POLL_THRESHOLD.Behaviour
reset(e.g. a fresh deployment mid-day). Use a distinct kind (cold_start) or record it differently.reconstructedrows fromget_group_recent_rate_async.Acceptance criteria
Related: #26, #31, #30, PR #68, #74 (inline values from the same review).