chore(statistics): PR #167 third-pass P3 follow-ups (multiplier helper names, typed log record, duplicated params and plan assertions) #219
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#219
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?
Deferred P3 findings from the third review pass on #167 (baseline and query follow-ups for #96, #97 and #124). None of them blocked the merge. Under the repo rule, a follow-up PR's third-pass P3s become one linked issue.
Standards
analytics_service.py). The module helper_trusted_cycle_multiplier(log)returnsfloat | None. The method_trusted_cycle_multiplier_async(day, bounds, default)returns the default instead of None._plausible_trusted_multiplier.Mapping[str, Any]rather thanCalibrationLogRecord.CalibrationLogRecord, so the type is checked where it's consumed.CalibrationLogRecordis incomplete (occupancy_models.py).SELECT *also returnsrank_in_cycle, which the TypedDict omits.is_trustedis typedint, but the column has no NOT NULL constraint._cycle_values_params(cycles), used by all four.tests/test_statistics_periods.py). The two EXPLAIN-plan assertion blocks are copies of each other._assert_indexed_plan(sql, params)helper, used for both queries.Spec
test_hourly_baseline_appends_duplicate_clock_labels_on_dst_fallbacknow checks positional averaging, and the plan doc cites the old name.Context: measured performance after the fix
The batched queries plan as
SEARCH e USING INDEX idx_counting_events_cam_range, with noMATERIALIZE. On the productionaiosqlitepath:The remaining per-day peak and average Riemann work is tracked in #203.
Refs #167, #96, #97, #124, #203.
🤖 Generated with Claude Code