Skip to content

face_greeter: gate suppression on appearance-bearing roster members#106

Merged
BrettKinny merged 1 commit into
mainfrom
face-greeter-appearance-gate
May 23, 2026
Merged

face_greeter: gate suppression on appearance-bearing roster members#106
BrettKinny merged 1 commit into
mainfrom
face-greeter-appearance-gate

Conversation

@BrettKinny
Copy link
Copy Markdown
Owner

Summary

Follow-up to #93 / #102 / #103. Tightens the bare-greet suppression in dotty-behaviour/consumers/face_greeter.py so it only fires when at least one roster member is actually identifiable by the room_view VLM path.

  • The gap: #23: bare-greet suppression — any roster member #93 introduced _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) requires appearance: set on the person — it calls HouseholdRegistry.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.
  • Fix: rename _roster_is_populated()_roster_has_identifiable_members() and back it with bool(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.
  • Inverted the existing test_face_detected_suppressed_when_roster_non_empty (was asserting the buggy behaviour) to test_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)
  • Live verify: household with display-name-only entry should now fire "Hi!" on face_detected; household with at least one appearance: entry should stay silent (room_view named greet takes over)

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 23, 2026 10:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
@BrettKinny BrettKinny merged commit efd5329 into main May 23, 2026
10 checks passed
@BrettKinny BrettKinny deleted the face-greeter-appearance-gate branch May 23, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants