fix(slack): warn when channels map is keyed by name instead of channel ID#89438
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 5, 2026, 3:56 AM ET / 07:56 UTC. Summary PR surface: Source +57, Tests +117. Total +174 across 2 files. Reproducibility: yes. Source inspection reproduces the issue shape: current routing ignores name-keyed Slack channel entries unless dangerous name matching is enabled, and current main has no doctor warning for those keys. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the Slack-owned doctor warning with the focused tests, while keeping routing ID-first and avoiding a compatibility-changing runtime fallback. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection reproduces the issue shape: current routing ignores name-keyed Slack channel entries unless dangerous name matching is enabled, and current main has no doctor warning for those keys. Is this the best way to solve the issue? Yes. A Slack-owned doctor warning is the best narrow fix because docs already require channel IDs and changing routing or adding strict startup failure would be a larger compatibility decision. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 1a3ce7c2a8da. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +57, Tests +117. Total +174 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
ce85dad to
c150a9e
Compare
|
Thanks for the review! Addressed both rank-up moves so the warning matches routing semantics:
Added regression tests for both (lowercase / |
|
🦞👀 Command router queued. I will update this comment with the next step. |
c150a9e to
30bb9e8
Compare
|
Addressed the 4th P1 (effective group policy): the doctor now computes the Slack group policy the same way the runtime does — |
|
🦞👀 Command router queued. I will update this comment with the next step. |
30bb9e8 to
99ddf10
Compare
|
Aligned the effective-policy check with the loaded Slack default per the Best-possible-solution: an omitted/default groupPolicy is treated as |
|
🦞👀 Command router queued. I will update this comment with the next step. |
…l ID Under groupPolicy: "allowlist" (the default), a `channels.slack.channels` entry keyed by a human channel NAME instead of a Slack channel ID never matches the ID-first routing, so messages in that channel are silently dropped — the schema accepts the shape and no diagnostic fires. `slackDoctor.collectMutableAllowlistWarnings` now also flags name-keyed channel map entries (skipping valid IDs, the "*" wildcard, accounts with name matching enabled, and non-allowlist group policies), telling the operator to re-key with the channel's ID. Diagnostic-only — routing semantics are unchanged. Fixes openclaw#81665. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
27d88fa to
f2ea6c6
Compare
|
Land-ready verification for Local proof:
GitHub proof:
Known proof gap: no live Slack workspace was used. The change is a static doctor diagnostic, covered against the current Slack account-merging and inbound routing contracts. |
Diagnose Slack channel-map keys that cannot route as configured, including account inheritance, open-policy overrides, malformed room identifiers, and DM identifiers. Fixes openclaw#81665 Co-authored-by: Alix-007 <[email protected]>
Diagnose Slack channel-map keys that cannot route as configured, including account inheritance, open-policy overrides, malformed room identifiers, and DM identifiers. Fixes openclaw#81665 Co-authored-by: Alix-007 <[email protected]>
Diagnose Slack channel-map keys that cannot route as configured, including account inheritance, open-policy overrides, malformed room identifiers, and DM identifiers. Fixes openclaw#81665 Co-authored-by: Alix-007 <[email protected]>
Summary
Fixes #81665.
Slack channel maps are authored as free-form records, but inbound room routing only consumes stable C/G conversation IDs unless dangerous name matching is explicitly enabled. Invalid keys could therefore be accepted while their allow/deny and per-channel overrides were silently ignored.
What changed
dmPolicy/allowFrompaths.Routing behavior is unchanged; this is a doctor diagnostic only.
Real behavior proof
Behavior addressed:
openclaw doctornow reports Slack channel-map keys that inbound routing cannot consume, including ignored open-policy overrides and misplaced DM IDs.Real environment tested: Local source checkout at
f2ea6c6558aad3f816179c233f770274ff881589.Exact steps or command run after this patch:
Evidence after fix: 4 test files / 62 tests passed; both extension type lanes passed; all 114 plugin package-boundary compiles passed; final branch-wide autoreview reported no actionable findings.
Observed result after fix: Doctor warnings identify the authored provider/account path, explain wildcard/drop/open-policy outcomes, preserve valid name-matching forms, and route DM remediation to the effective account scope.
What was not tested: No live Slack workspace call. The change is static diagnostics over existing config and routing contracts.
Verification
git diff --check