fix(slack): serialize follow-ups and support thread cancellation - #819
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks 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 |
f85c2d8 to
c99190e
Compare
|
The latest updates on your projects. Learn more about Unkey Deploy
|
c99190e to
36dd5d9
Compare
|
Slack follow-ups could run under another speaker's memory identity or remain queued after the fourth response. Process consecutive messages from each speaker together and keep draining until the thread is idle. Redis atomically checks capacity and lock ownership, and retains pending messages and deletion references long enough for the full queue to run. Coordination failures stop execution and surface a retry message.
Users can reply
stopin the current conversation thread, or mention@Databuddy stopin a channel, to interrupt its response and discard earlier queued follow-ups. Cancellation preserves later requests and new clicks on older suggestion cards, works across replicas through Redis, and respects shutdown. A local active run accepts stop even if its engagement marker is missing; unrelated unengaged threads remain silent. Assistant stop dispatch does not depend on title or status API calls. Help copy documents the command.Validation: all 95 Slack tests pass with #822 included, including sustained follow-ups, mixed speakers, expired lock owners, slow queued responses, missing engagement markers, shutdown, and failed cosmetic calls. Four combined scenarios with two native Bolt instances and an isolated, nonpersistent Redis server verify author grouping, stop cutoffs, concurrent queue capacity, replacement lock owners, duplicate deliveries, and later requests. Root lint, all 33 typecheck tasks, and all 29 pre-push test tasks pass. Independently reviewed.
Scope is Slack conversation lifecycle. No database migrations, dependencies, Slack scopes, or installation changes. Stop does not undo completed actions or cancel already submitted durable investigation jobs. Per-speaker app authorization and trusted action approvals remain separate work. AI-assisted implementation and review.