feat(occupancy): curate monthly historical flow drafts #163

Open
opened 2026-09-27 23:29:46 +00:00 by gabogg · 4 comments
Owner

Part of #160.
Blocked by: #162, #113, #114 and #161 (which builds on #108). Maintainer decision 2026-09-28: land these first; PRs #166, #176, #177, #175 and #178.

Result

An admin can curate one staged, completed facility-calendar month in a private web workspace. Fetching or saving draft edits does not change published statistics. The admin reviews each business day and records enough evidence to approve a month with Complete, Partial or Missing days.

Acceptance

  • Show month and day coverage across the expected counting cameras, source revision, local-versus-HikCentral overlap, retrieval errors, and differences from a previously approved revision. Default to the current 12-camera set; require explicit validation of mismatches without silently applying today's mapping to a different historical topology.
  • Allow a month-wide historical weekly schedule plus dated exceptions, holidays and timed/day-long event annotations as private draft context. Reuse #113's imported schedule source and #114's effective-date policy; #161 defines holiday/event identity and historical edit audit. Confirm operating hours and all day contexts before approval.
  • Make curation day-level. Detect known local ingestion gaps and absent source rows; do not infer a missing day or hour from low traffic or the existing heuristic Cycle Completeness score. A camera-hour with any local observations remains local; only wholly unobserved hours are candidates. Partly observed hours remain unresolved. An absent HikCentral row is unresolved until an admin confirms a genuine zero from HikCentral.
  • Permit Fully Missing days with valid HikCentral rows to be reviewed for recovery. If no usable source exists, leave the day Missing. If HikCentral still lacks hours after a recheck, mark the day Partial and keep the gap visible. Admins need not inspect every camera-hour manually; present day-level evidence and exceptions.
  • Permit review of a month with unresolved Partial/Missing days only with an explicit reason for each unresolved case. Keep drafts durable across sessions. Restrict fetch, edit, approve-preparation and discard actions to admins; record actor, time, revision and reasons. Preserve staged snapshots after later publication.
  • Add tests for day status, zero confirmation, mixed local/source overlap, schedule/context drafts, camera mismatch, admin-only access and audit history. The draft must remain invisible to presentation routes.

Approval/publication of counts is tracked separately from this review workspace; see #160's publication child.

Part of #160. Blocked by: #162, #113, #114 and #161 (which builds on #108). Maintainer decision 2026-09-28: land these first; PRs #166, #176, #177, #175 and #178. ## Result An admin can curate one staged, completed facility-calendar month in a private web workspace. Fetching or saving draft edits does not change published statistics. The admin reviews each business day and records enough evidence to approve a month with Complete, Partial or Missing days. ## Acceptance - Show month and day coverage across the expected counting cameras, source revision, local-versus-HikCentral overlap, retrieval errors, and differences from a previously approved revision. Default to the current 12-camera set; require explicit validation of mismatches without silently applying today's mapping to a different historical topology. - Allow a month-wide historical weekly schedule plus dated exceptions, holidays and timed/day-long event annotations as private draft context. Reuse #113's imported schedule source and #114's effective-date policy; #161 defines holiday/event identity and historical edit audit. Confirm operating hours and all day contexts before approval. - Make curation day-level. Detect known local ingestion gaps and absent source rows; do not infer a missing day or hour from low traffic or the existing heuristic Cycle Completeness score. A camera-hour with any local observations remains local; only wholly unobserved hours are candidates. Partly observed hours remain unresolved. An absent HikCentral row is unresolved until an admin confirms a genuine zero from HikCentral. - Permit Fully Missing days with valid HikCentral rows to be reviewed for recovery. If no usable source exists, leave the day Missing. If HikCentral still lacks hours after a recheck, mark the day Partial and keep the gap visible. Admins need not inspect every camera-hour manually; present day-level evidence and exceptions. - Permit review of a month with unresolved Partial/Missing days only with an explicit reason for each unresolved case. Keep drafts durable across sessions. Restrict fetch, edit, approve-preparation and discard actions to admins; record actor, time, revision and reasons. Preserve staged snapshots after later publication. - Add tests for day status, zero confirmation, mixed local/source overlap, schedule/context drafts, camera mismatch, admin-only access and audit history. The draft must remain invisible to presentation routes. Approval/publication of counts is tracked separately from this review workspace; see #160's publication child.
Author
Owner

Relabelled needs-triage: this issue reuses #113 (per-day schedule records), #114 (effective-date policy) and #161 (holiday/event identity), which are all still unimplemented. Draft PR #170 lists the options (private draft context now / wait for #113 and #161 / split the server-side day review first) and the open UI placement question. Return to ready-for-agent once decided.

Relabelled `needs-triage`: this issue reuses #113 (per-day schedule records), #114 (effective-date policy) and #161 (holiday/event identity), which are all still unimplemented. Draft PR #170 lists the options (private draft context now / wait for #113 and #161 / split the server-side day review first) and the open UI placement question. Return to `ready-for-agent` once decided.
Author
Owner

Maintainer decision (2026-09-28): build the dependencies first, then #163 on top of them. Relabelled ready-for-agent + blocked. Prerequisite drafts: #176 (#113), #177 (#114), #175 (#108), #178 (#161, stacked on #175). Implementation PR: #170.

Maintainer decision (2026-09-28): build the dependencies first, then #163 on top of them. Relabelled `ready-for-agent` + `blocked`. Prerequisite drafts: #176 (#113), #177 (#114), #175 (#108), #178 (#161, stacked on #175). Implementation PR: #170.
Author
Owner

Unblocked: every prerequisite has merged (#175, #176, #177, #178). The implementation is PR #170.

Unblocked: every prerequisite has merged (#175, #176, #177, #178). The implementation is PR #170.
Author
Owner

Split (maintainer decision, 2026-10-03): PR #170 delivers the API and data layer, and #270 delivers the private web workspace. #163 closes when both have merged; PR #170 should use Refs #163 rather than Closes #163, or #270 closes it.

Split (maintainer decision, 2026-10-03): PR #170 delivers the API and data layer, and #270 delivers the private web workspace. #163 closes when both have merged; PR #170 should use `Refs #163` rather than `Closes #163`, or #270 closes it.
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#163
No description provided.