Harden Slack team chat bridge delivery - #543
Draft
elie222 wants to merge 2 commits into
Draft
Conversation
(cherry picked from commit 6ca8792)
Claim running→delivering with a 2-minute lease, and reclaim abandoned delivering rows only when nextAttemptAt is null or expired so concurrent instances cannot both send. Co-authored-by: William Flanagan <wflanagan@audienti.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Playwright screenshotsFeature frames for this PR:
Open screenshot gallery · Dashboard · CI run Updated for commit |
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.
Why
Supersedes fork PR #540 (Harden Slack team chat bridge delivery) from @wflanagan (William Flanagan /
omalab/rakazo). That fork tip was unpushable (403 even withmaintainerCanModify), so this re-hosts the work onelie222/rakazoonto the same #538 base (cursor/supersede-pr-536-slack-bridge-09de).Greptile flagged a delivery-reservation race on the original hardening: reclaiming
deliveringwithout an exclusive lease could let two instances both send.What changed
6ca8792): Slack workspace pinning,idempotencyKey→client_msg_id, ambient promote-before-ignore, and delivery reservation.running→deliveringwith a ~2-minutenextAttemptAtlease; abandoneddeliveringrows are reclaimed only whennextAttemptAtis null or ≤ now, refreshing the lease in the same update so only one instance wins.Tested
pnpm exec vitest run apps/api/src/team-chat-bridge.test.ts packages/adapters/src/slack-team-chat.test.ts(26 passed)pnpm exec biome checkon touched filesNo UI changes (no screenshots).
Credit: William Flanagan (@wflanagan). Do not merge until review is complete.