Repository navigation
fix(automations): Bind only dispatch-destination outcome posts to the run - #2607
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
4 screenshot changes — 4 changed · 0 added · 0 removed Review screenshots in Frameshift
|
This branch was successfully deployed
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.
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:…, failedassertSameOptionalConversationDestination, and was rejected at ingress withslack.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:
resume.tsalso 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]