fix(slack): accept raw bot IDs in trustedBotIds#814
Conversation
OpenAB PR ScreeningThis is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Screening report## IntentPR #814 fixes Slack The operator-visible problem: trusted Slack bots may be incorrectly rejected unless OpenAB can resolve FeatFix. Behavioral change: Slack bot trust checks now accept raw Slack Bot IDs directly, keep the existing Bot ID to Bot User ID resolution path, warn on Who It ServesPrimary beneficiaries: Slack deployers and agent runtime operators. Secondary beneficiaries: maintainers reviewing Slack auth/gating behavior, because the trusted bot matching rules become explicit and tested. Rewritten PromptFix Slack trusted bot filtering so Implementation requirements:
Merge PitchThis is a small, operator-facing correctness fix for Slack deployments. It makes configuration less brittle by supporting the identifier Slack actually sends in event payloads. Risk profile is low to moderate: the main concern is whether accepting raw Best-Practice ComparisonOpenClaw principles relevant here:
Hermes Agent principles relevant here:
Implementation OptionsConservative option: accept raw Balanced option: introduce a small pure helper for Slack trusted bot matching that takes raw bot ID, resolved user ID, and configured trusted IDs, then use it from the event gate. This keeps behavior testable without over-touching Slack runtime code. Ambitious option: normalize Slack bot identity handling into a typed identity model, e.g. Comparison Table
RecommendationAdvance with the balanced option if the PR already trends that way: a small pure helper plus focused tests gives reviewers a clean behavioral surface and avoids burying identity rules inside Slack event handling. Do not expand this into a larger Slack identity refactor during this PR. Merge the correctness fix first, then open a follow-up only if maintainers see more Slack identity checks spreading through the codebase. |
|
Verified raw B… matching against an actual |
|
LGTM ✅ — Clean fix for raw Bot ID matching in trustedBotIds. What This PR DoesFixes How It Works
Findings
Baseline Check
What's Good (🟢)
|
Discord Discussion URL: https://discord.com/channels/1491295327620169908/1504239931940409587/1504240354608808170
Summary
Fixes Slack
trustedBotIdsgating when Slack event payloads provide raw Bot IDs (B...) and operators configure either raw Bot IDs or Bot User IDs (U...).Changes:
event.bot_iddirectly intrusted_bot_ids.B... -> U...resolution path for configs using Slack Bot User IDs.bots.infofails instead of degrading silently toresolved=None.U...matching requiresusers:readforbots.info.B..., resolvedU..., failed resolution, and empty bot IDs.Fixes #811
Test plan
cargonorrustcin PATH.