Skip to content

fix(automations): Keep event automations out of threads - #1891

Merged
dcramer merged 2 commits into
mainfrom
fix/event-automation-channel-destinations
Sep 22, 2026
Merged

dcramer merged 2 commits into
mainfrom
fix/event-automation-channel-destinations

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Extends #1888 to event automations: deliver to channels or DMs, never threads. Watches stay thread-bound.

Migration 0044 removes stored thread destinations. Reads also handle rows written by older workers during deployment; new writes reject thread fields. Already queued dispatches keep their original destination.

via David Cramer.

--

View Junior Session [Sentry]

@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Sep 22, 2026 10:29pm UTC

Request Review

@dcramer
dcramer marked this pull request as ready for review September 22, 2026 22:24
@github-actions github-actions Bot added the risk: high PR risk score: high label Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

2 screenshot changes — 2 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Detail · Desktop
Conversation Detail · Desktop
Changed
Conversation Detail · Mobile
Conversation Detail · Mobile
Changed

@dcramer
dcramer merged commit 50cc67e into main Sep 22, 2026
42 checks passed
@dcramer
dcramer deleted the fix/event-automation-channel-destinations branch September 22, 2026 22:35
dcramer added a commit that referenced this pull request Oct 8, 2026
A scheduled automation run posted its report at the channel top level. A
PR Watch it created then posted "getsentry/yc-scraper#5 merged." as a
second top-level message instead of replying in the report's thread.

**Root cause**

Since #1888 and #1891, automation runs have a channel-level Location
with no thread. The run's first reply is bound to the Conversation, so
user replies in that thread already route back to it. Watch Turns
ignored that binding and posted to the channel again on every event.
Event-only Conversations had the same problem.

**Fix**

When a Turn's Slack Location has no thread, reply under the first Slack
Message bound to the Conversation in that channel. If nothing is bound
yet, the first reply still starts the thread.

**Known gap**

When a run's only output is a DM to its creator, Watch replies still go
to the channel the automation was created in. Tracked in #2014.

<!-- junior-request-attribution:start -->
via **David Cramer**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0B595QDZLL%3A1791479373.496159 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0B595QDZLL%3A1791479373.496159)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0B595QDZLL%3A1791479373.496159/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: David Cramer <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — b83de320 Deployed Sep 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant