fix(slack): case-insensitive channel ID matching for allowlist groupPolicy#26878
Closed
byungsker wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(slack): case-insensitive channel ID matching for allowlist groupPolicy#26878byungsker wants to merge 1 commit intoopenclaw:mainfrom
byungsker wants to merge 1 commit intoopenclaw:mainfrom
Conversation
…olicy Slack always delivers channel IDs in uppercase (e.g. C0ABC12345) but operators commonly write them in lowercase (c0abc12345) when copying from docs or older tooling. resolveSlackChannelConfig passed only the raw channelId to buildChannelKeyCandidates, so resolveChannelEntryMatch could not find the config entry and silently dropped all channel events when groupPolicy was 'allowlist'. Fix: add both lowercase and uppercase variants of channelId to the candidate list. buildChannelKeyCandidates deduplicates identical keys, so there is no overhead for IDs that are already in the canonical case. Two new test cases cover both directions (uppercase runtime/lowercase config and the inverse). Fixes openclaw#26874
steipete
added a commit
that referenced
this pull request
Feb 26, 2026
…thanks @lbo728) Land contributor PR #26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.com>
Contributor
|
Landed on
Included in landing:
Thanks @lbo728 for the fix and tests. |
2 tasks
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Feb 27, 2026
… match (thanks @lbo728) Land contributor PR openclaw#26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.com>
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
… match (thanks @lbo728) Land contributor PR openclaw#26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.com>
vincentkoc
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Feb 28, 2026
… match (thanks @lbo728) Land contributor PR openclaw#26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.com>
vincentkoc
pushed a commit
to rylena/rylen-openclaw
that referenced
this pull request
Feb 28, 2026
… match (thanks @lbo728) Land contributor PR openclaw#26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.com>
steipete
added a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
… match (thanks @lbo728) Land contributor PR openclaw#26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.com>
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
… match (thanks @lbo728) Land contributor PR openclaw#26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
… match (thanks @lbo728) Land contributor PR openclaw#26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.com>
thebenjaminlee
pushed a commit
to escape-velocity-ventures/openclaw
that referenced
this pull request
Mar 7, 2026
… match (thanks @lbo728) Land contributor PR openclaw#26878 from @lbo728; include changelog credit and regression tests. Co-authored-by: lbo728 <extreme0728@gmail.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
When
groupPolicy: "allowlist"is configured for Slack, channel IDs in the config are often written in lowercase (e.g.c0abc12345) but Slack delivers events with uppercase IDs (C0ABC12345). BecauseresolveSlackChannelConfigpassed only the rawchannelIdtobuildChannelKeyCandidates, the case-sensitive property lookup inresolveChannelEntryMatchsilently failed, causing all channel events to be dropped.DMs are unaffected (they route through
dmPolicy, bypassing the channel gate).The failure is completely silent — no warning is logged — making it very difficult to diagnose.
Root Cause
resolveSlackChannelConfigbuilds its candidate key list as:None of the candidates include the lowercase form. When
resolveChannelEntryMatchiterates the candidates and doesObject.prototype.hasOwnProperty.call(entries, key), it never findsc0abc12345.Fix
Add both the lowercase and uppercase variants of
channelIdto the candidate list.buildChannelKeyCandidatesalready deduplicates identical keys, so there is no overhead for IDs that are already in the canonical case.Tests
Two new test cases in
monitor.test.ts:c0abc12345→C0ABC12345) ✅All 22 monitor tests pass. All 238 Slack tests pass.
Fixes #26874
Greptile Summary
This PR fixes a silent bug where Slack channel events were dropped when
groupPolicy: "allowlist"was configured. The issue occurred because Slack delivers channel IDs in uppercase (e.g.,C0ABC12345) but users commonly write them in lowercase in their config files (e.g.,c0abc12345). The case-sensitive property lookup failed silently, causing all channel events to be dropped.The fix adds both lowercase and uppercase variants of the
channelIdto the candidate key list inresolveSlackChannelConfig. ThebuildChannelKeyCandidatesfunction already deduplicates identical keys, so there's no performance overhead for IDs already in the canonical case.Confidence Score: 5/5
buildChannelKeyCandidates, adds both case variants conditionally (only when they differ from the original), and includes comprehensive test coverage for both directions of the case mismatch. The change is isolated to the channel config resolution logic and follows established patterns in the codebase for case-insensitive matching.Last reviewed commit: cdd9d8d