Repository navigation
fix(slack): unify slash command registration ownership - #118735
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 3, 2026, 11:50 AM ET / 15:50 UTC. ClawSweeper reviewWhat this changesThe PR centralizes Slack slash-command mode selection so handler registration, App Home metadata, optional native runtime loading, and native argument listeners all use the same result. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain This remains a useful, focused Slack bug-fix PR. The unified registration result repairs the current mismatch between the configured handler, App Home metadata, and native argument listeners; merge should wait for redacted real Slack behavior proof and the exact-head hosted checks already in progress. Priority: P2 Review scores
Verification
How this fits togetherSlack provider startup chooses either a configured single slash command or native commands, then passes that decision to App Home rendering. Native argument menus are additional Slack listeners and should exist only when native commands are the active registration mode. flowchart LR
A[Slack account configuration] --> B[Command registration decision]
B --> C[Configured slash handler]
B --> D[Native command runtime]
B --> E[App Home command hint]
D --> F[Native argument listeners]
C --> G[Slack command replies]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +19. Total +18 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one Do we have a high-confidence way to reproduce the issue? Yes, from source: enable a configured Slack slash command while native commands are enabled. Current main registers the configured handler but returns native mode and continues into native listener setup; the focused harness represents that state, though this read-only review did not execute it. Is this the best way to solve the issue? Yes. The proposed discriminated registration result is the narrowest maintainable fix because the owner that registers commands also supplies the mode consumed by App Home and native listener setup. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f9baa3e89421. 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
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
When a Slack account enables both a configured single slash command and native commands, the actual configured slash-command handler is correctly registered, but the same owner incorrectly reports native mode and registers native argument/action listeners that no command owns. As a result, Slack App Home omits the configured command hint and orphan interactive listeners remain installed.
Why This Change Was Made
Resolve the authoritative command-registration mode once at the Slack owner, then use that same decision for actual handler registration, returned App Home metadata, optional native-runtime loading, and native argument listeners. The currently shipped beta's existing configured-single-command precedence is preserved; inactive native runtimes no longer load.
User Impact
Configured Slack slash commands appear correctly in App Home, use their actual custom command names, and no longer install unusable native argument handlers. Native-only commands, plugin/skill commands, account/global settings, disabled commands, and Bolt receiver binding preserve their existing behavior; no configuration or public API changes.
Evidence
850f48b92d3a2797c8b33312b353ac3bcc8cbe42; parent:73535e4ede7eaa51cd4f97f4087657b05814e3d4; exact two-file binary patch SHA-256:705f3cb7fcf54b7fd540d0e8ef531df7348641521aec8e619739741fd250cbd7.nativemode and installed an orphan native interaction listener; the reviewed owner returns the actual configuredsinglemode and registers zero orphan action/options handlers.@slack/[email protected]confirms command, action, and options handlers are independent listeners. Currentmainand shippedv2026.7.2-beta.7already register the configured single handler first; the earlier stable-to-beta precedence change is pre-existing and this patch does not change it.gpt-5.6-solhigh-reasoning/no-web autoreview was clean with confidence 0.98; checksum-verified TruffleHog found no secrets.app.processEvent, followed by a real installed Slack Web API HTTPPOST /api/views.publishto a guarded loopback provider. Both global and account native commands were enabled alongside configured/acme. The production owner registered the real/acmelistener, returned{ "mode": "single", "name": "acme" }, registered zero native action/options listeners, acknowledged the real Bolt event exactly once, and published the actual App Home wire payload containing`/acme`. The equivalent parent registered the same/acmecommand but incorrectly returnednative, added one orphan action plus one orphan options listener, and published an App Home payload without/acme.@slack/[email protected]dist/App.js:332-362anddist/App.d.tsshow separately registered action/command/options listeners;v2026.7.2-beta.7:extensions/slack/src/monitor/slash.tsproves the configured single command already takes precedence over native command registration. The earlier reviewer could not access these sources, but they were personally verified against installed dependencies and the actual shipped tag.AGENTS.mdexplicitly accepts channel-visible mock-provider harness verdict JSON when it covers the changed path. Production LOC delta: -1; there is no configuration, public SDK, authentication, or security-contract change.{ "proof": "actual-bolt-and-web-api-loopback-provider-event", "exactHead": "850f48b92d3a2797c8b33312b353ac3bcc8cbe42", "packages": { "bolt": "5.0.0", "slackWebApi": "8.0.0" }, "configuredCommand": "/acme", "accountNativeEnabled": true, "globalNativeEnabled": true, "parent": { "registration": "native", "nativeActionListeners": 1, "nativeOptionsListeners": 1, "appHomeContainsConfiguredCommand": false }, "candidate": { "registration": { "mode": "single", "name": "acme" }, "nativeActionListeners": 0, "nativeOptionsListeners": 0, "boltEventAcknowledgements": 1, "actualHttp": "POST /api/views.publish", "appHomeText": "Send a DM, mention OpenClaw in a channel, or use `/acme` to start a session." }, "liveSlackWorkspace": false, "userCredentialsUsed": false, "externalNetworkUsed": false, "verdict": "PASS" }