Repository navigation
fix(discord): post the button-press acknowledgment into the incident's thread - #420
Merged
Merged
Conversation
…s thread postAcknowledgmentNotice claimed to announce the acknowledgment "in the incident's thread" but addressed interaction.ChannelID — the channel the alert button lives in — and the ack-notice fan-out skips the origin guild on the promise that the thread notice already happened. So the acknowledgment appeared in the channel (the rewritten card) but never in the thread, while resolved/unacknowledged follow-ups correctly landed there. The notice now resolves the incident's thread from the forward incident→thread state entry the notification sender wrote at post time — un-archiving it first, the same dance postThreadReply does for late follow-ups — and falls back to the channel when no thread is on record. The state-entry keys move to the discord package so both halves share them.
fclairamb
enabled auto-merge (squash)
September 21, 2026 22:04
A check that is down (its target unreachable) makes the check surfaces poll for live updates — /checks and /results every few seconds — so networkidle can never settle on the badges page and the first test timed out 3/3 in CI. Every wait it removed is followed by an auto-waiting assertion or click, so element visibility is what these tests actually needed.
This was referenced Sep 22, 2026
Merged
fclairamb
added a commit
that referenced
this pull request
Sep 22, 2026
🤖 I have created a release *beep* *boop* --- ## [0.31.1](v0.31.0...v0.31.1) (2026-09-22) ### Bug Fixes * **cli:** publish sp as bare, version-free binaries and add a Windows build ([#417](#417)) ([a6ed0e1](a6ed0e1)) * **deps:** update module github.com/aws/aws-sdk-go-v2/service/s3 to v1.113.2 ([#416](#416)) ([7e24d89](7e24d89)) * **discord:** post the button-press acknowledgment into the incident's thread ([#420](#420)) ([4722147](4722147)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
fclairamb
added a commit
that referenced
this pull request
Sep 22, 2026
…idle (#422) ## Problem `docs-links.spec.ts`'s badges case is the last spec still waiting for `networkidle` after the client-side navigation into the badge builder. That wait never completes in that path: the page is rendered and the network is fully quiet (verified at CDP level), but Playwright's network-idle lifecycle event never fires — deterministic on macOS headless Chromium, intermittent on loaded CI runners. CI run 35663414815 hung exactly there, twice, in the two badges-arrival specs. `badges.spec.ts`'s equivalent already had its `networkidle` dropped (landed with #420); this file was missed. ## Fix Wait for the docs link itself, which is what the test asserts anyway. ## Verification - Local repro (failing 100% before): `bunx playwright test e2e/docs-links.spec.ts` → all green alongside `e2e/badges.spec.ts` (31 passed). - `bunx eslint e2e/docs-links.spec.ts`: clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pressing Acknowledge on a Discord alert rewrote the alert card in the channel ("✅ #100 … acknowledged by @you") and posted a follow-up — but into the alerts channel, never into the incident's thread, while every later follow-up ("Incident resolved", …) lands in that thread. The comment is a lie in
postAcknowledgmentNotice(it says "into the incident's thread" and posts tointeraction.ChannelID), and the ack-notice fan-out deliberately skips the origin guild on the promise that the thread notice already happened (see the doc comment onAcknowledgeIncidentFromDiscord). Net result: nothing about the ack ever reached the thread.postAcknowledgmentNoticenow resolves the incident's thread from the forwardincidents/<uid>/discord/threadstate entry the notification sender wrote at post time, un-archives it first (same dancepostThreadReplydoes for late follow-ups), and posts there.Test plan
T-INC-1(the thread), notC-ALERTSgo test ./internal/integrations/discord/... ./internal/notifications/... ./internal/handlers/incidents/...green; golangci-lint (v2.13.2) clean on both touched packages