Skip to content

fix(slack): unify slash command registration ownership - #118735

Merged
steipete merged 1 commit into
mainfrom
codex/auto-qa-slack-command-mode-owner-735
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/auto-qa-slack-command-mode-owner-735

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Exact reviewed commit: 850f48b92d3a2797c8b33312b353ac3bcc8cbe42; parent: 73535e4ede7eaa51cd4f97f4087657b05814e3d4; exact two-file binary patch SHA-256: 705f3cb7fcf54b7fd540d0e8ef531df7348641521aec8e619739741fd250cbd7.
  • Authentic tests-first RED: the configured handler returned the wrong native mode and installed an orphan native interaction listener; the reviewed owner returns the actual configured single mode and registers zero orphan action/options handlers.
  • 61/61 focused Slack slash-command and App Home sibling tests passed; exact-file formatter, configured lint, maximum-line ratchet, and committed diff checks passed. Production code shrinks by one line.
  • Direct inspection of installed @slack/[email protected] confirms command, action, and options handlers are independent listeners. Current main and shipped v2026.7.2-beta.7 already register the configured single handler first; the earlier stable-to-beta precedence change is pre-existing and this patch does not change it.
  • Four independently scoped hostile owner, SDK/lifecycle, release-history, and type/test reviews found no P0–P3 issues. Exactly one genuine gpt-5.6-sol high-reasoning/no-web autoreview was clean with confidence 0.98; checksum-verified TruffleHog found no secrets.
  • Exact-head required CI openclaw/ci-gate: SUCCESS (850f48b). The complete exact-head required GitHub Actions gate passed before this evidence update.
  • Actual Bolt 5.0.0 / Web API 8.0.0 wire verdict: PASS. The maintainer independently reran the actual production command-registration owner and actual App Home event owner through a real installed Bolt app.processEvent, followed by a real installed Slack Web API HTTP POST /api/views.publish to a guarded loopback provider. Both global and account native commands were enabled alongside configured /acme. The production owner registered the real /acme listener, 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 /acme command but incorrectly returned native, added one orphan action plus one orphan options listener, and published an App Home payload without /acme.
  • Installed Bolt source and shipped beta precedence directly verified. Installed @slack/[email protected] dist/App.js:332-362 and dist/App.d.ts show separately registered action/command/options listeners; v2026.7.2-beta.7:extensions/slack/src/monitor/slash.ts proves 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.
  • Maintainer-authorized behavior-proof gate satisfied without live-tenant claims. The captured diagnostic below is an actual production-owner / installed-Bolt / installed-Web-API / real-loopback-HTTP integration, not a mocked command-registration unit assertion; it uses no live Slack workspace, no user credentials, and no external network. Root AGENTS.md explicitly 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"
}

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: S maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 3, 2026, 11:50 AM ET / 15:50 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 850f48b92d3a2797c8b33312b353ac3bcc8cbe42

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation and focused regression coverage are coherent, but real Slack behavior proof remains a merge gate.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR supplies focused test-harness evidence but explicitly has no live Slack tenant proof; add a redacted after-fix workspace run showing the configured command in App Home and the absence of unusable native interactions. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR supplies focused test-harness evidence but explicitly has no live Slack tenant proof; add a redacted after-fix workspace run showing the configured command in App Home and the absence of unusable native interactions. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current owner-boundary mismatch: Current main registers the configured single command first, but later derives the returned mode solely from native command availability; App Home can therefore omit the active configured command and native argument listener setup can still proceed.
Canonical registration result: The PR initializes a discriminated registration result from the configured single-command mode, loads native commands only when that mode is disabled, and gates native argument listeners on the final native result.
Downstream App Home consumer: Slack provider startup uses the returned registration only to supply the active configured single-command name to App Home event registration.
Findings None None.
Security None None.

How this fits together

Slack 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
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR supplies focused test-harness evidence but explicitly has no live Slack tenant proof; add a redacted after-fix workspace run showing the configured command in App Home and the absence of unusable native interactions. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - No redacted after-fix Slack workspace proof was supplied: the present evidence is mock-harness-based and does not demonstrate App Home output or listener behavior in a real Slack installation.
  • Resolve merge risk (P1) - Exact-head hosted validation is still running and should finish before merge.
  • Resolve merge risk (P1) - The read-only checkout could not fetch older promisor history or inspect installed @slack/bolt source because network resolution failed; this limits provenance and dependency-contract confirmation, not the observed local source mismatch.
  • Complete next step (P2) - No mechanical repair is needed; contributor-owned real Slack proof and the exact-head hosted validation are the remaining merge gates.
Agent review details

Security

None.

PR surface

Source -1, Tests +19. Total +18 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 23 24 -1
Tests 1 20 1 +19
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 43 25 +18

Review metrics

Metric Value Why it matters
Production vs. regression test LOC production -1 net, tests +19 net The patch removes duplicate mode derivation while adding targeted regression coverage.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain one SlackCommandRegistration result as the authority for handler registration, App Home metadata, native runtime loading, and native argument listeners, then merge after real Slack proof and exact-head validation are available.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain one SlackCommandRegistration result as the authority for handler registration, App Home metadata, native runtime loading, and native argument listeners, then merge after real Slack proof and exact-head validation are available.

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.

Labels

Label changes:

  • add P2: Configured Slack slash-command users can receive an incorrect App Home hint and unused native interactions, but the affected configuration combination has limited blast radius.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR supplies focused test-harness evidence but explicitly has no live Slack tenant proof; add a redacted after-fix workspace run showing the configured command in App Home and the absence of unusable native interactions. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: Configured Slack slash-command users can receive an incorrect App Home hint and unused native interactions, but the affected configuration combination has limited blast radius.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR supplies focused test-harness evidence but explicitly has no live Slack tenant proof; add a redacted after-fix workspace run showing the configured command in App Home and the absence of unusable native interactions. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current owner-boundary mismatch: Current main registers the configured single command first, but later derives the returned mode solely from native command availability; App Home can therefore omit the active configured command and native argument listener setup can still proceed. (extensions/slack/src/monitor/slash.ts:963, f9baa3e89421)
  • Canonical registration result: The PR initializes a discriminated registration result from the configured single-command mode, loads native commands only when that mode is disabled, and gates native argument listeners on the final native result. (extensions/slack/src/monitor/slash.ts:390, 850f48b92d3a)
  • Downstream App Home consumer: Slack provider startup uses the returned registration only to supply the active configured single-command name to App Home event registration. (extensions/slack/src/monitor/provider.ts:657, f9baa3e89421)
  • Focused regression coverage: The added test enables a custom configured command in a native-enabled harness and asserts the single-mode result plus zero native action/options registrations. (extensions/slack/src/monitor/slash.test.ts:853, 850f48b92d3a)
  • Three-way merge check: The patch applies cleanly to current main in a local three-way merge inspection, and the PR diff has no whitespace errors. (extensions/slack/src/monitor/slash.ts:390, 850f48b92d3a)
  • History and dependency limitation: Local blame attributes the current registration block to a Slack file-split commit by Peter Steinberger, but deeper history and direct installed Bolt-source inspection were blocked because missing promisor objects and network access could not be resolved. (extensions/slack/src/monitor/slash.ts:963, 8d1fe4f09106)

Likely related people:

  • steipete: The current registration block is locally blamed to Peter Steinberger’s Slack file-split commit, and this PR directly replaces that block with the unified owner result. (role: recent Slack-area contributor and proposed repair author; confidence: medium; commits: 8d1fe4f09106, 850f48b92d3a; files: extensions/slack/src/monitor/slash.ts, extensions/slack/src/monitor/provider.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Post a redacted after-fix Slack workspace recording, screenshot, or diagnostic output that shows the configured command hint and confirms relevant native interactions are absent.
  • Let the exact-head hosted checks finish green; if updating the PR body does not refresh review automatically, ask a maintainer to comment @clawsweeper re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 7fc1089 into main Aug 3, 2026
106 of 111 checks passed
@steipete
steipete deleted the codex/auto-qa-slack-command-mode-owner-735 branch August 3, 2026 16:13
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main:
  fix(memory): honor keyed agents in standalone operations (#118310)
  fix(slack): unify slash command registration ownership (#118735)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant