Skip to content

feat(google-chat,ms-teams): emit classifier facets on chat links - #382

Merged
KrisBraun merged 1 commit into
mainfrom
chat-facets-google-chat-ms-teams
Aug 7, 2026
Merged

feat(google-chat,ms-teams): emit classifier facets on chat links#382
KrisBraun merged 1 commit into
mainfrom
chat-facets-google-chat-ms-teams

Conversation

@KrisBraun

Copy link
Copy Markdown
Contributor

Summary

Google Chat and Microsoft Teams links now carry classifier facets ({format, automation, reach}), completing the sweep that gave Slack (#381) and the other messaging connectors this signal. The facets let the platform tell real people's conversations apart from bot traffic without content inspection.

  • Direct and group chats are facetted {format: chat, reach: direct}, with automation judged over the whole message batch: only an all-bot conversation is automated, and a single human-shaped message keeps it human. This is deliberately fail-open — a muteable automated verdict that hides a real person is the one failure classification must never produce.
  • Named-space / channel threads are facetted reach: list, judged from the thread's parent message, with long posts reading as message rather than chat (same 1000-char rule as Slack).
  • Bot detection uses each provider's own signal: Google Chat's explicit sender.type (HUMAN/BOT); Teams' from.application (or a message with no human sender). Teams system event messages are excluded from the judgement, mirroring their exclusion from the synced notes.

Google Chat's space type isn't on the message resource, so the space/dm distinction is passed into transformChatThread from the sync path, which always knows which kind of space it is walking.

Test plan

  • New unit coverage for googleChatThreadFacets / googleChatDmFacets / teamsChannelFacets / teamsDmFacets, including the fail-open cases (mixed batches, empty batches, missing sender types) and the stripped-HTML length rule.
  • Transform-level assertions that both connectors stamp facets on the links they build (space vs dm reach, whole-batch DM judgement).
  • google-chat gains its vitest setup (config + script + devDep); existing ms-teams and slack suites still pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHoQc2TdA62Wp4BwUxvR6P

Google Chat and Microsoft Teams links now carry classifier facets
({format, automation, reach}), matching the Slack and other messaging
connectors so the platform can tell real people's conversations apart
from bot traffic:
- Direct and group chats are facetted as direct-reach chat, judged over
the whole message batch: only an all-bot conversation is automated,
and a single human-shaped message keeps it human (fail-open — a
muteable automated verdict that hides a real person is the one
failure classification must never produce).
- Named-space / channel threads are facetted as list-reach, judged from
the thread's parent message, with long posts reading as message
rather than chat.
- Google Chat judges bot-shape from the sender's explicit HUMAN/BOT
type; Teams from application-sent messages (or a missing human
sender), excluding system event messages from the judgement.
Both connectors get unit coverage for the facet functions and the
transform stamping; google-chat gains its vitest setup.
Claude-Session: https://claude.ai/code/session_01FHoQc2TdA62Wp4BwUxvR6P
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@KrisBraun
KrisBraun merged commit 97e41f3 into mainAug 7, 2026
1 check passed
@KrisBraun
KrisBraun deleted the chat-facets-google-chat-ms-teams branch August 7, 2026 12:42
Sign up for freeto 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.

1 participant

@KrisBraun