- Skip half_hour_report events from webhook posts in people_flow - Handle pre-existing stale worker status files during startup gracefully - Make store_dwell_alert timestamp parsing robust against invalid/empty values - Update lessons learned and todo documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9.4 KiB
Lessons
2026-05-12
-
Trigger: the user corrected the execution workflow for non-trivial tasks and required persistent task tracking.
-
Rule: for any non-trivial task, create or update
tasks/todo.mdbefore substantive implementation, keep progress current, and do not mark done without review evidence. -
Preventive action: check for
tasks/todo.md,tasks/lessons.md, and repository guidance files before editing code; if the user corrects process expectations, record the rule immediately. -
Trigger: the user required corrections to be persisted for future sessions.
-
Rule: any user correction must be recorded in
tasks/lessons.mdastrigger -> rule -> preventive action. -
Preventive action: after any correction, update lessons before closing the task and mention the recorded rule in the final verification summary.
-
Trigger: the user clarified that this repository is meant to run in mainland China environments.
-
Rule: future code, build, deployment, and integration changes must consider mainland China network accessibility and should prefer China-friendly defaults where practical.
-
Preventive action: when adding dependencies, mirrors, external endpoints, or download flows, explicitly check whether the default path works reliably in mainland China and add configuration or fallback when needed.
-
Trigger: the user required deployment to use
docker composeonly and explicitly disallowed host environment changes. -
Rule: for remote rollout tasks in this repo, prefer repository-contained
docker composechanges and do not install packages, edit host configs, or mutate global environment state unless the user explicitly approves it. -
Preventive action: when a deployment is blocked, first fix Dockerfiles, compose files, env files, and mounted paths inside the repo before considering any host-level workaround.
2026-05-15
- Trigger: the
.11OTA bundle host did not have azipexecutable, and the current Python containers no longer exposed the historicallapoverlay paths. - Rule: OTA bundle publication must not assume host archive tools or historical runtime overlay paths are present.
- Preventive action: when cutting a release, package the ZIP with Python stdlib if
zipis unavailable, treat overlay extraction as optional unless the paths are verified live in containers, and validate the final archive contents before upload.
2026-05-18
- Trigger: the user clarified that OTA installer updates should not keep repackaging and uploading the whole repository tree or fixed
people_flow_projectweights. - Rule: managed-portal OTA releases should ship a minimal ZIP with deploy metadata and managed config only;
people_flow_projectweights should be reused from a stable host location unless the weights themselves changed or the host is new. - Preventive action: when preparing OTA artifacts, use the minimal packaging script, exclude
managed/people_flow_project/weightsby default, and only publish a weights-bearing bundle for first-time installs or actual weight updates.
2026-05-19
-
Trigger: the user corrected the OTA publication login for
10.8.0.1. -
Rule: the OTA web host
10.8.0.1must be published withroot, notxiaozheng. -
Preventive action: for future managed-portal OTA rollouts, verify publication access against
root@10.8.0.1:/var/www/html/ai_deploybefore treating upload as blocked. -
Trigger: the user clarified that all new installation targets are Ubuntu machines and asked for missing
unzipto be handled automatically, with weights delivered separately. -
Rule: the managed-portal OTA installer should treat Ubuntu as the first-install baseline, auto-install
unzipviaapt-getwhen needed, and use a separate people-flow weights archive instead of forcing weights into the main ZIP. -
Preventive action: keep the main OTA ZIP minimal, publish
people-flow-weights-<RELEASE_VERSION>.tar.gzalongside each release when weights are available, and validate that the installer still reuses shared weights on upgrades. -
Trigger: the user corrected the YOLO weight repair strategy after a host had DeepFace weights but lacked only
yolo11n.pt. -
Rule: OTA recovery for a missing small model must not force a full 1GB+ weights archive download or fall back to public GitHub downloads.
-
Preventive action: publish a small
people-flow-yolo11n-<RELEASE_VERSION>.tar.gzartifact and make the installer download it when onlypeople_flow_project/weights/yolo11n.ptis missing.
2026-06-04
-
Trigger: the user corrected the OTA Docker registry address for the video-recognition rollout on
10.8.0.14. -
Rule: when updating OTA-hosted Docker images, use the exact registry host and port provided by the user;
ota.zhengxinshipin.comandota.zhengxinshipin.com:5443are not interchangeable. -
Preventive action: before concluding a remote image reference is missing, verify whether the intended registry includes a non-default port and test the exact
host:port/repo:tagreference. -
Trigger: the user clarified that the managed-portal four-service rollout must follow the published installer on
root@10.8.0.1:/var/www/html/ai_deploy. -
Rule: for managed-portal release updates, treat the published installer bundle and its embedded Compose/env files as the deployment source of truth instead of reverse-engineering the current host state.
-
Preventive action: before updating the managed-portal stack on a target host, inspect
install-managed-portal-*.sh,release-manifest.env, and the bundleddocker-compose.ota-release.ymlunder/var/www/html/ai_deploy. -
Trigger: the user redirected a live service investigation from
10.8.0.14to10.8.0.15. -
Rule: when continuing operational debugging across multiple hosts, do not assume the previously investigated host is still the active target after the user switches machines.
-
Preventive action: restate the target host before diagnosis or remediation, and refresh runtime evidence from that exact machine instead of carrying over prior-host conclusions.
2026-06-09
-
Trigger: the user corrected the intended people-flow RTSP source on
10.8.0.22. -
Rule: when validating or repairing managed child-service deployments, treat the user-provided live RTSP URL as the source of truth and verify that the running container environment matches it exactly.
-
Preventive action: after any host-specific stream correction, inspect both the release env file and the container's effective
RTSP_URL; if they differ, recreate only the affected service with the repository Compose/env inputs and record the exact URL used. -
Trigger: the user corrected the intended
store_dwell_alertRTSP source on10.8.0.15. -
Rule: for host-specific
store_dwell_alertstream changes, verify bothRTSP_URLand any derived identifiers such asCAMERA_IDin the deployed release env and the running container before concluding the rollout is correct. -
Preventive action: after changing a
store_dwell_alertstream on a target host, inspect the release env, renderdocker compose config, and recreate onlystore-dwell-alertso the effectiveRTSP_URLandCAMERA_IDmatch the intended source. -
Trigger: the user corrected the intended
store_dwell_alertRTSP source on10.8.0.22. -
Rule: even when the deployed release env on a host already has the intended
store_dwell_alertstream, do not assume the running container picked it up; verify the live container environment separately. -
Preventive action: on host-specific
store_dwell_alertchanges, comparedeploy/managed-portal.release.envwithdocker inspect store-dwell-alert; if the env is already correct but the container is stale, force-recreate onlystore-dwell-alert.
2026-06-10
-
Trigger: the user clarified during the
.14webhook repair thatvideo-recognitioninput_modeis dedicated to the RTSP recognition path and must not be changed for webhook integration. -
Rule: when repairing
store-dwell-alerttovideo-recognitionwebhook delivery on a host that already runs RTSP recognition, keep the mainvideo-recognitioninput_modeunchanged unless the user explicitly requests a recognition-mode switch. -
Preventive action: before mirroring a reference host's webhook setup, check whether that host's
input_modediffers from the target and, if it does, design the fix around a separate receiver path or image rather than changing the target's main recognition mode. -
Trigger: the user redirected the
.11image reuse plan to go through the shared OTA registry tag instead of a host-local sidecar-only image. -
Rule: when a working image on one host needs to be reused by other machines, publish the exact validated image content to the user-specified OTA registry tag first, then update targets by pulling that registry tag rather than relying on host-local image transfer alone.
-
Preventive action: before rolling a host-specific image fix to a single machine, check whether the user expects the image to become the shared registry baseline; if yes, validate the source image digest and publish it to the exact registry path before updating consumers.
-
Trigger: the user clarified that the live
.14deployment fix may usesudoon the target host. -
Rule: when host-owned deployment files block a required live fix and the user explicitly grants
sudo, prefer the directsudopath over indirect container-side file mutation. -
Preventive action: if a remote deployment edit fails on file ownership, check whether the user has authorized
sudo; when authorized, switch tosudofor the host-side config edit and service recreation commands.