#22371: fix(googlechat): log webhook target resolution failures
channel: googlechat
size: S
Cluster:
Webhook Configuration and Resilience
## what changed
- In `extensions/googlechat/src/monitor.ts`, log Google Chat webhook selection failures only once per error path using the first target in scope, preserving existing status/error text.
- Keep existing 401 behavior for:
- no verified target (`unauthorized`)
- multiple verified targets (`ambiguous webhook target`)
- Preserve existing response payloads; only diagnostic logging is adjusted to avoid per-target duplicate entries.
## why this fixes the issue
When webhook verification fails for Google Chat requests, logs were emitted once per configured target, causing noisy and duplicated output during ambiguous/no-target cases. Reporting a single diagnostic target now keeps signal clean and makes failures (`ambiguous` / `no verified webhook target`) easier to identify without changing runtime behavior.
## tests
- `pnpm check`
- `pnpm test`
- `pnpm canvas:a2ui:bundle`
- `bunx vitest run --config vitest.unit.config.ts`
- `pnpm vitest run extensions/googlechat/src/monitor.webhook-routing.test.ts extensions/msteams/src/messenger.test.ts src/discord/monitor/message-handler.process.test.ts`
## edge cases
- Existing unauthorized and ambiguous 401 responses remain unchanged.
- No schema/transport behavior changes; only error logging flow is deduplicated.
## unresolved infra-level noise (non-blockers)
- Some tests intentionally log transient service fallbacks (e.g., retry/backoff and gateway retry messages) while still passing assertions. These are environment-dependent warnings, not test failures.
Most Similar PRs
#20395: fix(googlechat): prevent infinite auto-restart and ambiguous-target...
by ggalmeida0 · 2026-02-18
77.6%
#22322: fix(googlechat): keep webhook monitor alive until abort
by AIflow-Labs · 2026-02-21
76.4%
#20551: fix(googlechat): prevent health monitor restart loop and add JWT ve...
by FredCat32 · 2026-02-19
72.6%
#19043: googlechat: fix runtime.error signature in startup error handling
by markesphere · 2026-02-17
67.7%
#20554: fix(googlechat): prevent infinite restart loop in startAccount
by Gitjay11 · 2026-02-19
67.7%
#15643: fix(googlechat): DM's works, but groups don't - return add-on actio...
by kamil-rudnicki · 2026-02-13
67.2%
#23134: fix(gateway): skip auto-restart for webhook channels that resolve i...
by puneet1409 · 2026-02-22
66.8%
#17527: fix(gateway): allow WebChat to attach to main session regardless of...
by Glucksberg · 2026-02-15
64.1%
#3837: fix(googlechat): space events response and thread reply context
by rehanchrl · 2026-01-29
64.0%
#22694: telegram: stabilize multi-account webhook mode
by Dongik · 2026-02-21
62.9%