Skip to content

[Fix] Independent Slack suggestions share one execution thread - #2449

Merged
brunobergher merged 2 commits into
developfrom
fix/slack-suggestion-thread-isolation-23j7ati00q1ek
Sep 10, 2026
Merged

[Fix] Independent Slack suggestions share one execution thread#2449
brunobergher merged 2 commits into
developfrom
fix/slack-suggestion-thread-isolation-23j7ati00q1ek

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Accepted Slack task suggestions now create one top-level execution thread and one Session per suggestion instead of reusing the automation report Session.
  • The execution thread is persisted on the suggestion card before dispatch so stale acceptance retries reuse the same root, while the work-item claim and a stable launch key prevent duplicate work.
  • Execution-root writes and cleanup carry the claim token and exact channel/thread coordinates. A stale claimant cannot overwrite or delete a newer claimant's root, and failed launches clear a root only while they still own both records.
  • The reacted card receives the eyes acknowledgement before launch. Slack's already_reacted response is treated as idempotent success, while other acknowledgement failures still stop the launch.
  • Origin Session metadata and source-task links remain provenance, not execution-routing authority. Setup/onboarding suggestion routing and non-Slack providers retain their existing behavior.

Why this change was made

Independent suggestions from one automation report could be accepted into the same Slack thread and Session. That mixed unrelated task history and allowed mutable routing for one task to affect announcements, progress, completion, and follow-up messages for another. Retry races also needed explicit ownership fencing so recovery could not block on an existing acknowledgement or remove a newer launch's active root.

Impact

Each accepted repository-task suggestion has an isolated conversational history and a stable Slack destination for its full lifecycle. This intentionally replaces origin-thread reuse for accepted independent work while remaining compatible with the publication provenance and acknowledgement work in #2440 and #2354. The changed behavior is backend Slack routing and concurrency control, so browser proof is not applicable; focused provider-boundary tests cover the retry cases.

@roomote-community

roomote-community Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

  • Retry recovery treats an existing eyes reaction as a failed acknowledgement (apps/api/src/handlers/slack/events/reactions.ts:631).
  • A stale claimant can clear and delete a newer launch's execution root (apps/api/src/handlers/slack/events/reactions.ts:587).

Reviewed 7d1ba6e

Comment thread apps/api/src/handlers/slack/events/reactions.ts
Comment thread apps/api/src/handlers/slack/events/reactions.ts
@roomote-roomote

Copy link
Copy Markdown
Contributor Author

Addressing both retry-safety findings on the existing PR branch: idempotent eyes acknowledgement and ownership-fenced execution-root cleanup.

@brunobergher
brunobergher marked this pull request as ready for review September 10, 2026 10:10
@brunobergher
brunobergher merged commit 855c280 into develop Sep 10, 2026
16 of 17 checks passed
@brunobergher
brunobergher deleted the fix/slack-suggestion-thread-isolation-23j7ati00q1ek branch September 10, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants