Skip to content

[Fix] Slack threads show duplicate review action buttons - #2421

Draft
roomote-roomote[bot] wants to merge 2 commits into
developfrom
fix/slack-thread-review-actions-2qrulpf375n6i
Draft

[Fix] Slack threads show duplicate review action buttons#2421
roomote-roomote[bot] wants to merge 2 commits into
developfrom
fix/slack-thread-review-actions-2qrulpf375n6i

Conversation

@roomote-roomote

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

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Retire older PR-review controls across an entire Slack workspace, channel, and thread, even when the prompts target different repositories or pull requests.
  • Serialize canonical Postgres and legacy Redis attachment arbitration with one Slack-thread fence, then keep the greatest posted Slack message timestamp actionable across both stores.
  • Leave unposted offers pending until their message attaches, preserve each review message's text during button removal, and retain the existing non-Slack ordering and tombstone behavior.
  • Clean up Redis losers best-effort if a later database operation fails, while allowing the database transaction to roll back and retry safely.

Why this change was made

Slack threads could accumulate multiple identical review action sets because existing retirement keys were narrower than the user-visible conversation. Independent canonical and legacy retirement also allowed attachment timing to keep the wrong controls or leave both stores live.

Impact

Each Slack thread now has one current review action set selected by visible post order, including during canonical/legacy races and delayed attachments. The surviving controls remain bound to their original task and pull-request target, while separate workspaces, threads, and non-Slack providers remain isolated.

@roomote-community

roomote-community Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Canonical and legacy Slack action stores retire separately, allowing races to leave duplicate or incorrectly retired controls.
  • Cross-PR legacy retirement orders offers by creation rather than posted Slack message order.

Reviewed f67d0ed

Comment thread packages/sdk/src/server/lib/task-runs/pr-review-action.ts
Comment thread packages/sdk/src/server/lib/task-runs/pr-review-action.ts Outdated
@roomote-roomote

roomote-roomote Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Fixed both Slack retirement races in f67d0ed. Canonical and legacy offers now share one thread fence and choose the visible winner by posted Slack timestamp; focused database, SDK, Fast-parent, and BullMQ tests pass. Both review threads are resolved.

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.

1 participant