face_greeter: gate suppression on appearance-bearing roster members#106
Merged
Conversation
Tightens PR #93's bare-greet suppression. The previous _roster_is_populated() check suppressed bare "Hi!" whenever the household had ANY member, but the named-greet path (PR #102) requires `appearance:` set to match a person via the room_view VLM. A roster with members configured but no appearances silently walked everyone in forever. Now: suppress only when at least one roster member is identifiable (has non-empty appearance). Members without appearance can't reach the named-greet path, so they correctly fall back to the bare "Hi!". The existing `test_face_detected_suppressed_when_roster_non_empty` was asserting the buggy behaviour; inverted to test the correct semantics. Existing appearance-bearing suppression test preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR tightens FaceGreeter’s bare “Hi!” suppression so it only suppresses when at least one household roster member is actually identifiable by the room_view VLM path (i.e., has a non-empty appearance:), avoiding silent walk-ins for households that only configure display_name entries.
Changes:
- Update FaceGreeter’s suppression gate from “registry non-empty” to “roster has appearance-bearing members” via
HouseholdRegistry.roster_ids_with_appearance(). - Rename the helper to reflect the new semantics (
_roster_has_identifiable_members). - Invert/update the previously buggy-behavior test to assert “bare hi” fires when the roster lacks appearances.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| dotty-behaviour/consumers/face_greeter.py | Adjusts bare-greet suppression logic to only trigger when roster members are VLM-identifiable (have appearance:). |
| dotty-behaviour/tests/test_consumer_face_greeter.py | Updates the regression test to assert bare greet fires when roster exists but no appearances are configured. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+12
to
+15
| * Suppressed when the household has at least one roster member | ||
| with `appearance:` set — the only members the room_view path can | ||
| identify by photo. Layer-6 proactive greeter / room-view | ||
| recognition fires a richer named greet within 1-2 s. |
Comment on lines
97
to
101
| # Hand off to roster-aware greeter when one exists | ||
| if self._roster_is_populated(): | ||
| if self._roster_has_identifiable_members(): | ||
| log.debug( | ||
| "face_detected → suppressed (roster owns greeting): device=%s", | ||
| device_id, |
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
Follow-up to #93 / #102 / #103. Tightens the bare-greet suppression in
dotty-behaviour/consumers/face_greeter.pyso it only fires when at least one roster member is actually identifiable by the room_view VLM path._roster_is_populated()which suppressed the bare "Hi!" whenever the household had ANY member. But the named-greet path (ported in #101: port room_view roster recognition path #102) requiresappearance:set on the person — it callsHouseholdRegistry.roster_ids_with_appearance()to know which IDs are eligible. A household with members configured but no appearances satisfied the suppression check while making the named path silently unreachable → walk-ins forever for that household._roster_is_populated()→_roster_has_identifiable_members()and back it withbool(self._household.roster_ids_with_appearance()). Same regression class Port room_view roster recognition path from bridge.py to dotty-behaviour #101 fixed at the route level, just applied to the suppression check.test_face_detected_suppressed_when_roster_non_empty(was asserting the buggy behaviour) totest_face_detected_fires_bare_hi_when_roster_lacks_appearances. The appearance-bearing suppression test and the no-roster fires test are unchanged.Test plan
cd dotty-behaviour && python -m pytest tests/ -q— 198 passed (same count as baseline, same coverage matrix)appearance:entry should stay silent (room_view named greet takes over)🤖 Generated with Claude Code