slack: keep requireMention thread follow-ups when thread session is active#21108
Closed
JayElRay wants to merge 1 commit intoopenclaw:mainfrom
Closed
slack: keep requireMention thread follow-ups when thread session is active#21108JayElRay wants to merge 1 commit intoopenclaw:mainfrom
JayElRay wants to merge 1 commit intoopenclaw:mainfrom
Conversation
|
This pull request has been automatically marked as stale due to inactivity. |
Contributor
|
Thanks for the contribution and the detailed work here. Closing this PR for now because it is superseded by a tighter Workstream 3 path that we are landing to avoid overlapping Slack threading/session changes in parallel. What we are keeping:
If you want, I can cross-reference any specific test or edge case from this PR into the active salvage PRs so your coverage is preserved. |
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.
Summary
requireMention=trueparent_user_id === botUserId(existing behavior), orprepare.test.tsto ensure unmentioned follow-up thread replies are accepted once the thread session is activeWhy
Slack thread roots started by humans often have
parent_user_id != botUserId, which can cause follow-up no-mention messages in the same active thread session to be dropped despite prior interaction.Validation
corepack pnpm exec vitest run src/slack/monitor/message-handler/prepare.test.ts13 passedGreptile Summary
Fixes Slack mention gating for thread follow-ups when
requireMention=true. Previously, unmentioned thread replies from human-started threads could be dropped despite an active session. The PR adds a check for existing thread sessions (existingThreadSessionUpdatedAt) and treats replies in active thread sessions as implicitly mentioned.storePathresolution andexistingThreadSessionUpdatedAtcheck earlier in the flow (before mention gating logic)implicitMentionto includethreadSessionHasHistorycondition alongside existingparent_user_id === botUserIdcheckctx.botUserIdcheck fromimplicitMention(still implicitly required viaparent_user_idcheck)requireMention: trueConfidence Score: 4/5
ctx.botUserIdcheck fromimplicitMentioncould theoretically allow messages through when botUserId is undefined, but theparent_user_id === ctx.botUserIdcomparison already handles this safely (returns false when botUserId is undefined).Last reviewed commit: b124544
(2/5) Greptile learns from your feedback when you react with thumbs up/down!