Expand description
Zone engine (Stage 3): evaluates tracked detections against per-camera polygon zones and raises enter / exit / dwell events (with an evidence frame). State is keyed per (camera, zone, track), held in memory, and driven by SERVER time (never the worker-supplied timestamp), so a skewed worker clock cannot corrupt or evict state. A small confirm-frame debounce suppresses boundary jitter, and a track still inside when its state expires gets a synthesized exit. Fed synchronously from detection ingest.