fix(slack): recognize bot-id-form mentions (<@B…>) everywhere - #843
Open
yaegerbomb42 wants to merge 1 commit into
Open
fix(slack): recognize bot-id-form mentions (<@B…>) everywhere#843yaegerbomb42 wants to merge 1 commit into
yaegerbomb42 wants to merge 1 commit into
Conversation
Recognize both bot user-id and bot-id mention forms in mentionsBot, stripMention, events thread-reply gate, mirror mentionsSelf, and turn-handler. Adds regression tests for B-form and legacy label shapes. Fixes yc-software#764 Co-authored-by: yzxcj797 <yzxcj797@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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.
🎯 Problem Solved & Context
Resolves the issue reported in #764 with a surgical, production-ready fix and regression test coverage.
Hand-typed
@qmmentions can arrive encoded as<@BOTID>(bot id) rather than<@UBOT>(bot user id). Slack fires noapp_mentionfor the B-form, so without recognizing it in message-gating the mention is silently dropped at top level and misdispatched as ambient in threads.📋 Technical Summary
mentionsBot(text, botUserId, ownBotId)— recognizes both U-form and B-form; two-arg call shape unchanged for back-compat.stripMention(text, botUserId, ownBotId)— strips both forms including legacy<@ID|label>shape.events.tsthread-reply gate andmirror.tsmentionsSelf — passownBotIdthrough.turn-handler.ts— strips B-form before dispatch so core never sees raw<@B…>token.🧪 Verification & Test Parity
main.slack-message-gating+slack-mrkdwn: 50/50 pass;tsc --noEmitclean.Fixes #764
Co-authored-by: yzxcj797 yzxcj797@users.noreply.github.com
💳 Payout Settlement Metadata:
0xbf10d7ef874044c5a48074c049b5d23b57087537@yaegerbomb42Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.