3.4 KiB
3.4 KiB
Task Plan
Checklist
- Verify the local managed config files already match the requested webhook, 30-minute window, 5-minute queue threshold, and
2-5 normal / >5 crowdeddefaults. - Restore any queue-level code or tests that still reflect the temporary
>= thresholdcrowded behavior. - Run targeted validation for the touched queue-analytics logic.
- Update
tasks/todo.mdreview evidence and create a scoped git commit containing only the intended files.
Scope And Risks
- Scope: restore repository-local managed-service defaults so webhook delivery remains enabled, people-flow reporting flushes every 30 minutes, queue threshold is 5 minutes, fewer than 2 qualifying people means
人少,2-5means人数正常, and more than5means人多, then commit the relevant changes. - Expected touch points:
managed/people_flow_project/src/people_flow/queue_analytics.py,managed/people_flow_project/tests/test_queue_analytics.py, and verification of local config files undermanaged/*/config/plus any generated OTA test output that should remain aligned. - Risk: the worktree already contains unrelated modified and untracked files, so the commit must be scoped carefully to avoid pulling in unrelated work.
- Risk:
store_dwell_alertstill has a separate queue-level implementation with the same>crowded comparison, but the user asked specifically to restore local config defaults plus "the code"; if we only revert people-flow logic, we should be explicit about any remaining asymmetry.
Validation Intent
- Prove the local config files already encode
window_seconds: 1800,queue_time_threshold_seconds: 300,crowded_count_threshold: 5,normal_count_threshold: 2, and webhook URLs. - Prove the restored queue-level comparison classifies
over_threshold_count == 5asnormaland only>5ascrowded.
Review
- Status: completed.
- Config verification: local repository configs already matched the requested defaults before code edits.
managed/people_flow_project/config/local.yaml:webhook.urlpoints to managed queue,rtsp.window_seconds=1800,queue_time_threshold_seconds=300,crowded_count_threshold=5,normal_count_threshold=2.managed/store_dwell_alert/config/local.yaml:webhook.urlpoints to managed queue,queue_time_threshold_seconds=300,crowded_count_threshold=5,normal_count_threshold=2.- Generated OTA test configs under
test_output/managed-portal-test-ota/managed/.../config/local.yamlwere already aligned with the same values.
- Code restoration: reverted
managed/people_flow_project/src/people_flow/queue_analytics.pysoqueue_level="crowded"now requiresover_threshold_count > crowded_count_threshold, which restores the requested2-5 normal / >5 crowdedbehavior. - Test restoration: updated
managed/people_flow_project/tests/test_queue_analytics.pyso the preview-state coverage remains intact while the boundary assertion now provesover_threshold_count == crowded_count_thresholdstaysnormal. - Validation:
PYTHONPATH=. pytest tests/test_queue_analytics.pyinmanaged/people_flow_project- Result:
3 passed in 0.03s
- Commit scope note: only
managed/people_flow_project/src/people_flow/queue_analytics.py,managed/people_flow_project/tests/test_queue_analytics.py, andtasks/todo.mdshould be committed for this task because the worktree contains unrelated modified and untracked files.