Skip to content

feat(alerts): Google Chat as a notification destination - #1990

Merged
Makisuo merged 6 commits into
mainfrom
feat/google-chat-destination
Oct 30, 2026
Merged

Makisuo merged 6 commits into
mainfrom
feat/google-chat-destination

fix(alerts): Google Chat headline as fallbackText, not text

0ab09d2
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 30, 2026 in 50s

Confidence 8/10 · No issues found

🟢 Confidence 8/10 · likely safe to merge. Held at 8 because earlier reviews of this pull request found 1 defect.
no findings · tests covered · risk medium · 1/1 new units observable · 1 defect fixed in earlier rounds

Adds google-chat as an alert destination end to end; this head touches only the transport and its test, where escaping, the markdown subset and thread keying hold. The open maple-web HttpClientError/NotFoundError issues are unrelated to the resources.go destination-list edit and are not addressed.

  • buildGoogleChatMessage builds a cardsV2 message with the headline in fallbackText
  • markdownToCardHtml escapes before rewriting **bold** and http(s) links
  • threadedUrl adds messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD to the webhook URL

Production impact

Open errors in the changed files (2)
Issue Service Occurrences File
HttpClientError (5 issues) maple-web 83 packages/terraform-provider-maple/internal/provider/resources.go
NotFoundError maple-web 4 packages/terraform-provider-maple/internal/provider/resources.go

After this merges, Maple checks whether they stop.

What was checked
  • escapeHtml runs before the bold and link rewrites, so template text cannot inject a tag or an href (google-chat.ts:27)
  • Key and token stay in the query string; the span records url.path only, since sensitivePath is false (runTransport.ts:124)
  • dedupeKey as threadKey with the reply option matches Google's webhook threading, asserted in google-chat.test.ts:96
Observability coverage: 1 of 1 changes observable
Change Kind Observable Evidence
Google Chat webhook delivery (googleChatTransport.render via runHttpTransport) outbound HTTP client yes Effect.fn("AlertDelivery.http", { kind: "client" }) with peer.service: google-chat, server.address, url.path and http.response.status_code (runTransport.ts:108-125)

0ab09d2 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.