in-liberty420
995a02033d
fix(slack): surface auth.test failure + normalize explicit-bot mention check ( #85101 )
...
When the Slack adapter's startup auth.test call fails (bad token,
transient error, etc.), the bot user id silently stays empty for the
life of the process. The downstream explicit-bot mention check is
`botUserId && mentionedUserIds.includes(botUserId)`, which always
returns false when botUserId is empty. The result is that explicit
<@bot> mentions are silently classified as non-mentions with no log
trace explaining why.
Changes:
- provider.ts: stop swallowing auth.test failures; emit a warn log at
boot so the degraded state is observable. Empty user_id is treated
as a failure too.
- prepare.ts + subteam-mentions.ts: export the existing normalizeSlackId
helper and apply it to both sides of the explicit-bot equality check
(and to the mentioned-ids list). Real Slack ids are already uppercase,
so this is a no-op on healthy traffic, but it locks the invariant down
and removes the asymmetry between collected ids and the ctx bot id.
- prepare.test.ts: add two regression tests pinning the exact symptom:
positive case (botUserId set -> explicit_bot), negative case
(botUserId='' -> not explicit_bot, mention_source not explicit_bot).
🤖 AI-assisted.
Co-authored-by: in-liberty420 <in-liberty420@users.noreply.github.com >
2026-05-22 21:26:59 +01:00
..
2026-05-22 21:25:16 +01:00
2026-05-21 22:41:45 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-18 14:56:06 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-15 07:28:28 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:26:59 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-15 07:28:28 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-13 13:33:38 +01:00
2026-05-12 00:23:11 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-22 21:25:16 +01:00
2026-05-16 12:38:51 +01:00
2026-05-17 02:05:22 +01:00
2026-05-17 02:36:48 +08:00