Repository navigation
feat: unsupervised entry rule, with shot labels per operating mode - #33
Merged
Merged
Conversation
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Entry rule (
rules.py): while armed, a track in the pool zone raises oneUNSUPERVISED_ENTRY(emergency tier) on the first frame it is in the water.Labels per operating mode (
labels.py,shots.yaml):modeis now required on every shot — a silent default had been replaying every clip armed.expected_event+onset_window→expected_events: [{event, onset_window}], because an armed replay ofdrowning-test.mp4correctly raises both entry and submersion.swim.drowning-test.mp4is the only empty-pool start and is also labeledarmed.Replay tooling:
poolguard-replay --mode armed|swim(defaults to the label's mode); HUD showsENTRY — N in the water while armedand lists every expected event.Docs: decision log entries, PLAN, README status table (it still said the rules engine was unbuilt), CLAUDE.md labels rule.
Test plan
ruff check,ruff format --checkpytest(all extras) — new entry-rule, label-schema, HUD, replay-mode and CLI tests; written first and seen failingpytest -m regressionon local backyard footage: all event assertions pass in both modes. Only failure is the knownadult-exitsheadcount miss (decision log 2026-10-13)poolguard-replay --video clips/drowning-test.mp4 --labels tests/labels/shots.yaml --mode armed: entry at 1.3 s (jump at ~1.4 s), submersion at 37.0 s, 1 track, nothing else