chore(schedule): third-pass P3 follow-ups from PR #228 #275

Open
opened 2026-10-03 20:24:33 +00:00 by gabogg · 0 comments
Owner

Third-pass P3 findings from PR #228 (spec #186). None blocks merge.

  • Tautological frontend test. In tests/frontend/test_schedule_exception.test.js, "week and month context entries render without dangling colon for nameless holidays" rebuilds the template literal and asserts constants; it runs no production code. test_statistics_deck_week/_month already guard the behaviour. Delete it.
  • Review-finding IDs in code. app/services/monitor_service.py:118 and the docstring at app/services/occupancy_service.py:1338 cite "(#186, Spec P3-2)". Keep #186, drop the review-finding ID (the same pattern exists at occupancy_service.py:783).
  • Unbounded default stamp range. get_first_flow_epoch_async (app/db/occupancy_repository.py ~2297) takes an unfiltered MIN(timestamp_epoch) over all cameras, and the default stamp range skips the 10-year guard. One event from a camera with a bad clock (e.g. 1970) would make the admin default stamp write tens of thousands of days in one transaction. Keep a sanity bound or ignore implausible epochs.
Third-pass P3 findings from PR #228 (spec #186). None blocks merge. - [ ] **Tautological frontend test.** In `tests/frontend/test_schedule_exception.test.js`, "week and month context entries render without dangling colon for nameless holidays" rebuilds the template literal and asserts constants; it runs no production code. `test_statistics_deck_week`/`_month` already guard the behaviour. Delete it. - [ ] **Review-finding IDs in code.** `app/services/monitor_service.py:118` and the docstring at `app/services/occupancy_service.py:1338` cite "(#186, Spec P3-2)". Keep `#186`, drop the review-finding ID (the same pattern exists at `occupancy_service.py:783`). - [ ] **Unbounded default stamp range.** `get_first_flow_epoch_async` (`app/db/occupancy_repository.py` ~2297) takes an unfiltered `MIN(timestamp_epoch)` over all cameras, and the default stamp range skips the 10-year guard. One event from a camera with a bad clock (e.g. 1970) would make the admin default stamp write tens of thousands of days in one transaction. Keep a sanity bound or ignore implausible epochs.
Sign in to join this conversation.
No milestone
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#275
No description provided.