Repository navigation
fix: enable Slack native approvals for Enterprise Grid installs - #120874
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 9, 2026, 2:49 AM ET / 06:49 UTC. ClawSweeper reviewWhat this changesThis PR enables Enterprise Grid Slack approvals by carrying the originating workspace through approval delivery, button callbacks, and final message updates. Merge readinessKeep open: the runtime repair follows the existing Enterprise workspace boundary, but the prior P1 documentation blocker remains on the unchanged head. The Enterprise manifests still omit Slack interactivity, so configured approval buttons cannot send callbacks. Priority: P1 Review scores
Verification
How this fits togetherThe Slack plugin receives Enterprise workspace events, creates workspace-qualified targets, and sends approval prompts through Slack. Button actions resolve the approval through Gateway and update the originating Slack message in that same workspace. flowchart LR
A[Enterprise Slack event] --> B[Workspace-qualified target]
B --> C[Approval prompt]
C --> D[Slack approval button]
D --> E[Validated workspace callback]
E --> F[Gateway decision]
F --> G[Workspace-scoped message update]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +56, Tests +229, Docs +4. Total +289 across 15 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Add approval-only interactivity to both Enterprise manifests, including the HTTP callback URL, then rerun the focused Slack checks on the updated head. Do we have a high-confidence way to reproduce the issue? Yes — current source proves Enterprise accounts are presently excluded, and the branch’s documented manifests lack the interactivity configuration required for the new callback path. No live Enterprise Grid run was supplied. Is this the best way to solve the issue? Yes, with the remaining documentation repair: preserving the workspace at the Slack target, receipt, and validated callback boundaries is the narrowest owner-aligned fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dba99b355b4e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Co-authored-by: Sarah Fortune <[email protected]>
|
Land-ready proof for exact head
The ClawSweeper findings are addressed: Interactivity is enabled in every first-party complete Slack manifest/setup path; the callback uses Bolt's full middleware type; Enterprise exec approvers must be explicit and team-qualified; Enterprise plugin/wildcard authorization remains disabled; unsigned/model-authored, tampered, wrong-key, and cross-team-replayed buttons are rejected before authorization or Gateway calls. Known gap: no live Enterprise Grid click-through was run because real org-install credentials were unavailable. This is not claimed as live proof. @clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Merged via squash.
|
…claw#120874) * fix(slack): scope Grid native approvals by team * fix(slack): type action middleware context * fix(slack): secure Grid native approvals Co-authored-by: Sarah Fortune <[email protected]> --------- Co-authored-by: Sarah Fortune <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where Enterprise Grid operators could not use Slack-native exec approval buttons even though OpenClaw already carried the originating workspace through Enterprise routing. The original path disabled native approvals, and incomplete app setup could leave visible buttons with no callback delivery.
Why This Change Was Made
Slack now owns the complete Enterprise approval boundary: only exec approvals are enabled, and they require explicit
team:<team-id>:user:<user-id>entries inchannels.slack.execApprovals.approversthat match the request's originating team. Raw Slack IDs andcommands.ownerAllowFromare ignored for Enterprise accounts, and Enterprise plugin approvals remain unavailable because their approver identity is not workspace-qualified.Enterprise button values are signed with HMAC-SHA256 using the resolved Slack account token and originating team, then verified before authorization or Gateway resolution. Unsigned or model-authored values, tampering, wrong credentials, and cross-team replay fail closed. Workspace installs keep the existing v1 behavior. Pending receipts and final updates retain team scope and use the listener-owned workspace client.
Every first-party complete Slack manifest and setup path now enables Interactivity. Socket Mode does not require a public Interactivity Request URL; HTTP mode uses the same public Slack endpoint as Event Subscriptions. The callback listener type also follows the installed
@slack/[email protected]middleware contract:SlackActionMiddlewareArgs & AllMiddlewareArgs.No generic core, protocol, or storage surface changed. The local post-review repair covered exactly 21 files: production
+372/-23, tests+646/-59, docs+66/-22, generated+5/-5(total+1089/-109). The production growth implements the workspace-qualified authorization invariant and credential-bound callback provenance; tests are counted separately.User Impact
Enterprise Grid operators can configure and use Slack-native exec approvals without letting a workspace-local user ID authorize another workspace. Approval prompts, approver DMs, button callbacks, and final status updates stay with the originating team. Existing workspace-installed Slack apps keep exec and plugin approval behavior; Enterprise plugin approvals remain disabled.
Existing Slack apps must enable Interactivity before approval buttons can deliver callbacks. New operators get that setting in every documented manifest and setup path.
Evidence
node scripts/run-vitest.mjs extensions/slack/src/approval-actions.test.ts extensions/slack/src/exec-approvals.test.ts extensions/slack/src/approval-native.test.ts extensions/slack/src/approval-handler.runtime.test.ts extensions/slack/src/monitor/events/interactions.test.ts extensions/slack/src/monitor/provider.allowlist.test.ts extensions/slack/src/send.update.test.ts extensions/slack/src/setup-surface.test.ts src/docs/channel-config-examples.test.tsResult: 9 files, 190 tests passed (4 core docs and 186 Slack).
git diff --check: clean.blacksmith-testbox, leasetbx_01kzkwnh38vpfkp1yyr3mv78dy, slugquick-lobster-2a62. Bundled-channel metadata, production types, oxlint shards, format check, test/script/root types, and extension package boundary compile/canary succeeded, including all 125 extension compiles and 2 canaries.cf65bcd530e27b586214079e6290f3544fb0a7f2:READY FOR /prepare-pr,issueValidation.status=valid, zero findings.tbx_01kzkrz5kd09za077s5gg8yhk4stopped before relevant lanes on unrelated moving-main max-lines ratchet entries. No baseline was edited; the exact relevant lanes above are green.AI-assisted: yes