hermes-agent/plugins/platforms/google_chat
kshitijk4poor 8578f898cb test(google-chat): cover relay-declared sender_type honoring
Adds five regression tests for the Format 3 (Cloud Run relay) envelope
path:

- test_relay_flat_honors_declared_sender_type_bot: BOT sender_type
  propagates to msg['sender']['type'].
- test_relay_flat_defaults_sender_type_human_when_absent: backward
  compat \u2014 missing field still flows as HUMAN.
- test_relay_flat_coerces_unknown_sender_type_to_human: defensive
  coercion \u2014 strip+upper normalizes whitespace/case, anything outside
  {HUMAN, BOT} falls back to HUMAN.
- test_relay_flat_bot_sender_is_filtered_end_to_end: end-to-end
  through _on_pubsub_message \u2014 a relay envelope with sender_type=BOT
  is dropped by the BOT self-filter without dispatch.
- test_relay_flat_human_sender_dispatches: end-to-end negative
  control \u2014 human relay envelopes still reach the agent loop.

Also clarifies the operator contract in the adapter comment: the
relay must forward upstream sender.type as envelope.sender_type,
otherwise bot replies forwarded as HUMAN cannot be distinguished
from genuine humans by this filter.
2026-05-09 02:31:31 -07:00
..
__init__.py feat(plugins/google_chat): Google Chat platform adapter as a bundled plugin 2026-05-07 07:15:44 -07:00
adapter.py test(google-chat): cover relay-declared sender_type honoring 2026-05-09 02:31:31 -07:00
oauth.py feat(plugins/google_chat): Google Chat platform adapter as a bundled plugin 2026-05-07 07:15:44 -07:00
plugin.yaml feat(plugins/google_chat): Google Chat platform adapter as a bundled plugin 2026-05-07 07:15:44 -07:00