Skip to content

fix(automations): Bind only dispatch-destination outcome posts to the run - #2607

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/dispatch-outcome-thread-binding
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/dispatch-outcome-thread-binding

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Fixes JUNIOR-R4.

When an automation run posts to an outcome destination that is different from its own destination (for example, a channel automation that DMs its creator), the Slack turn bound that post's thread to the run's Conversation. The Conversation keeps the automation's destination. So every reply in that DM thread mapped to agent-dispatch:…, failed assertSameOptionalConversationDestination, and was rejected at ingress with slack.event.persist.failed. The user only saw the thinking reaction appear and disappear. In production, one reminder thread hit this 16 times (4 replies plus Slack retries).

The fix binds an outcome post only when its destination matches the Conversation's destination. A reply in a thread somewhere else now starts its own Slack Conversation through the normal path. The existing same-channel outcome binding stays the same.

The multiple-outcome integration test now checks that the DM post stays unbound and the same-destination post binds to the run.

Remaining risk:

  • Bindings that were written before this change remain. Replies in those old threads still fail. Only one thread in production is affected so far.
  • resume.ts also binds outcome post ids, but under the run destination's channel id. That makes a mismatched binding that no reply can match, so it does not cause this failure. I left it out of scope.

via Charly Gomez.

--

View Session [Sentry]

… run

An automation run that delivers to another channel, such as the
creator's DM, bound that post's thread to the run's Conversation. The
Conversation keeps the automation's destination, so every reply in the
DM thread failed the destination check and Junior never answered.

Fixes JUNIOR-R4

Co-Authored-By: Charly Gomez <charly.gomez@sentry.io>
@vercel

vercel Bot commented Nov 3, 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 Nov 3, 2026 1:24pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

This branch was successfully deployed

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

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants