Repository navigation
feat(slack): add workspace routing for Enterprise Grid actions and events - #121014
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 9, 2026, 9:56 PM ET / August 10, 2026, 01:56 UTC. ClawSweeper reviewWhat this changesThis PR enables Enterprise Grid Slack interactions, slash commands, selected channel lifecycle events, and workspace-qualified routing for replies and deferred actions. Merge readinessKeep open. The final head still enables a deliberately excluded Enterprise Grid interaction surface, including approval and binding callbacks, and loses the listener workspace in slash-command GroupSpace metadata. Priority: P2 Review scores
Verification
How this fits togetherSlack Bolt delivers events and interactions to the Slack plugin, which validates the listener workspace before converting them into OpenClaw sessions, tool actions, and Slack replies. Enterprise Grid requires every downstream identity and API call to retain that workspace boundary. flowchart LR
A[Slack workspace event] --> B[Bolt listener context]
B --> C[Enterprise scope validation]
C --> D[Interaction and slash handlers]
D --> E[Session and policy context]
E --> F[Workspace-scoped Slack reply]
D --> G[Approval and binding callbacks]
Decision needed
Why: Current main and docs intentionally exclude these privileged paths, while the PR enables them through a generic registrar; the allowed product and authorization contract needs owner intent. Before merge
Findings
Agent review detailsSecurityNeeds attention: The PR widens a Slack authorization boundary and currently permits callback classes it claims remain unavailable for Enterprise Grid. PR surfaceSource +353, Tests +292, Docs +40. Total +685 across 19 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt an explicitly approved Enterprise interaction subset, hard-block native approval and binding callback classes for Grid, and carry routingTeamId into GroupSpace with regression coverage. Do we have a high-confidence way to reproduce the issue? Yes—source reproducibly shows Enterprise slash commands derive routingTeamId but assign GroupSpace from the intentionally empty account-level team ID; the existing Grid slash harness is the focused regression path. Is this the best way to solve the issue? No. Listener-scoped routing is the right owner boundary, but this patch must preserve the stated exclusion for approval and binding callbacks and propagate that scope into GroupSpace. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f4e62523afe8. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What 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 (5 earlier review cycles)
|
2c83976 to
b55b2d5
Compare
b55b2d5 to
7711722
Compare
7610135 to
8c8b5c9
Compare
…ions and events (#121357) * feat(slack): add workspace routing for Enterprise Grid actions and events (#121014) * fix(slack): preserve team scope for deferred actions * refactor(slack): use typed Bolt team context * refactor(slack): preserve deferred action IDs * refactor(slack): treat team IDs as opaque * refactor(slack): keep deferred action diff focused * fix(slack): enable scoped enterprise interactions * fix(slack): keep event scope at listener boundary * test(slack): model Bolt enterprise interaction context * refactor(slack): normalize listener team context * refactor(slack): pass modal event scope directly * test(slack): preserve interaction harness argument types * refactor(slack): pass shortcut event scope directly * refactor(slack): pass action event scope directly * fix(slack): scope enterprise slash commands * test(slack): disambiguate slash harness scope * fix(slack): type slash block suggestions * fix(slack): preserve option text literal * fix(slack): keep scope helpers private * fix(slack): fall back from slash response URLs * fix(slack): clarify Web API post message call * fix(slack): scope post message lint suppression * fix(slack): preserve event scope export after rebase * fix(slack): preserve team-bound modal session routing * fix(slack): retain modal direct-message routing * fix(slack): preserve modal delivery compatibility * docs(slack): mark enterprise tool actions supported * docs(slack): align enterprise support with runtime * test(slack): align enterprise interaction registration * fix(slack): support Grid channel create and rename events --------- Co-authored-by: Sarah Fortune <[email protected]> * fix(slack): resolve release backport conflicts --------- Co-authored-by: Sarah Fortune <[email protected]>
…ents (openclaw#121014) * fix(slack): preserve team scope for deferred actions * refactor(slack): use typed Bolt team context * refactor(slack): preserve deferred action IDs * refactor(slack): treat team IDs as opaque * refactor(slack): keep deferred action diff focused * fix(slack): enable scoped enterprise interactions * fix(slack): keep event scope at listener boundary * test(slack): model Bolt enterprise interaction context * refactor(slack): normalize listener team context * refactor(slack): pass modal event scope directly * test(slack): preserve interaction harness argument types * refactor(slack): pass shortcut event scope directly * refactor(slack): pass action event scope directly * fix(slack): scope enterprise slash commands * test(slack): disambiguate slash harness scope * fix(slack): type slash block suggestions * fix(slack): preserve option text literal * fix(slack): keep scope helpers private * fix(slack): fall back from slash response URLs * fix(slack): clarify Web API post message call * fix(slack): scope post message lint suppression * fix(slack): preserve event scope export after rebase * fix(slack): preserve team-bound modal session routing * fix(slack): retain modal direct-message routing * fix(slack): preserve modal delivery compatibility * docs(slack): mark enterprise tool actions supported * docs(slack): align enterprise support with runtime * test(slack): align enterprise interaction registration * fix(slack): support Grid channel create and rename events --------- Co-authored-by: Sarah Fortune <[email protected]>
What Problem This Solves
Enterprise Grid org-wide Slack installs need every action and event to retain the originating workspace. Deferred Block Kit actions, modal callbacks, shortcuts, and slash-command follow-ups could otherwise route through an ambiguous channel or user ID. Enterprise installs also did not register workspace-safe channel-created and channel-renamed notifications.
What This Adds
The implementation uses Bolt's typed
context.teamIdand exact listener WebClient as the ownership boundary. Sessions, plugin conversations, dedupe keys, deferred targets, direct Web API calls, and event context keys remain workspace-qualified. Workspace installs keep their existing behavior.channel_id_changedremains workspace-only because it mutates persisted channel configuration. Relay mode, App Home, Agent and Assistant lifecycle events, Slack-native approvals, bindings, and presence events also remain unavailable for Enterprise Grid accounts.This PR supersedes #121311 by folding its channel-created and channel-renamed support into the same workspace-routing change.
User Impact
Users with one org-installed Slack app can use interactions, slash commands, tool actions, and supported channel lifecycle notifications across covered workspaces without cross-workspace routing or delivery.
Manual Test Plan
Use one org-installed test app in two covered workspaces with a distinct marker in each workspace.
Evidence
oxfmtpassed on all 20 changed files.oxlintpassed on all 19 changed TypeScript files.node scripts/docs-list.jspassed.git diff --checkpassed.AI-assisted: Codex implemented and reviewed this change. I understand the behavior and the changes in this PR.