Skip to content

Keep Slack control notifications from crashing gateways - #150608

Merged
pash-openai merged 1 commit into
mainfrom
pash/slack-socket-control-envelope
Sep 17, 2026
Merged

pash-openai merged 1 commit into
mainfrom
pash/slack-socket-control-envelope

Conversation

@pash-openai

Copy link
Copy Markdown
Contributor

Slack can send an Events API control notification, such as app_rate_limited, without a nested message event. Socket Mode 3.0.1 dereferences payload.event.type before Bolt sees it, causing an unhandled rejection that exits the gateway. We observed this stack in live gateways and reproduced it through the real SDK socket.

Handle these event-less envelopes at the Slack receive boundary: record a concise warning, acknowledge them using the SDK sender, and keep normal messages on the existing Bolt and durable-ingress path. The regression cases verify that both a rate-limit notification and an incomplete envelope are acknowledged, while the next ordinary message arrives once on the same connection. No dependency or configuration changes.

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-17T05:08:10.634260Z 6d35faf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: S maintainer Maintainer-authored PR labels Sep 17, 2026
@pash-openai
pash-openai merged commit 179982f into main Sep 17, 2026
89 of 91 checks passed
@pash-openai
pash-openai deleted the pash/slack-socket-control-envelope branch September 17, 2026 05:06
steipete added a commit that referenced this pull request Sep 17, 2026
Fix the test-type and shared-fixture startup failures introduced by #150608. Narrow RawData before Buffer conversion and provide the acknowledgement sender and EventEmitter interface expected by the SDK guard.
steipete added a commit that referenced this pull request Sep 17, 2026
Require a typed acknowledgement callback and bind Slack's checked private
sender at receiver construction. Complete the Socket Mode fixtures and decode
ws RawData without an ambiguous Buffer.from overload.

Await the Enterprise startup fixture's actual start signal instead of polling
its mock under a one-second deadline, retaining the exact call-count assertion.

Follow up #150608 by @pash-openai while preserving its protection against
event-less Events API envelopes. No operator configuration or migration changes.
steipete added a commit that referenced this pull request Sep 17, 2026
…50656)

Complete the Slack Socket Mode envelope-guard construction repair following #150608 by @pash-openai. Require an explicit acknowledgement callback and bind the SDK sender during receiver construction, preserving SDK ownership of serialization and transport, event-less envelope acknowledgements, and continued ordinary message delivery.

Complete the receiver fixture and await the Enterprise startup fixture's actual start signal while retaining the exact call-count assertion. No operator action, configuration change, or migration is required.

Validation: 3,063 Slack tests across 165 files and full test typechecking passed on the patch-identical reviewed revision. Exact-head CI run 35190855262 is green; the scoped-clean review and exact-head ClawSweeper review have no actionable findings. Transport proof uses the real Slack SDK over isolated loopback sockets.

Related: #150608, #150630
obviyus added a commit that referenced this pull request Sep 17, 2026
…150596)

The diff includes an unchanged four-test file split to meet the line limit; production shrinks by 54 lines.

## What Problem This Solves

New local setups use Coding, which excludes messaging. The existing `openclaw` setup helper is also missing from the tool catalog.

## Why This Change Was Made

The owner approved Full for unprofiled local onboarding, including reruns, and the helper's group allow/deny membership. This intentionally revises #39012. The onboarding default has one writer. Security and Agents now save Full consistently; the UI uses the canonical tool catalog instead of a duplicate list.

## User Impact

New setups get broad tool selection. “Available tools” is distinct from “Execution permissions”; Full does not mean Full Access.

## Evidence

Real isolated onboarding: `coding` before → `full` after. [Commands and browser proof](https://gist.github.com/obviyus/3ba9dd83878ff416c0c462468926e79a).

| Before | After |
| --- | --- |
| ![Security before](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/2a71c2931e6ab1106951669898da69b298200603/before-security.png) | ![Security after](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/8a283ae74173f52403f233bd954180dc9162ed11/after-security.png) |
| ![Catalog before](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/e309d6966c18457200c4a4b3095a5feda77173a1/before-catalog.png) | ![Catalog after](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/1bc4551e27cdd72675119ec96c078dab10e73c36/after-catalog.png) |

## Compatibility

No migration or new settings. Existing explicit profiles and independent execution rules stay intact during normal upgrade. Re-onboarding an unprofiled config selects Full. Helper membership extends automation/OpenClaw group allows **and denies**; owner and sandbox checks remain.

[Compatibility proof](#150596 (comment)): published 2026.9.3 updater → candidate `d80239aace2d`, healthy Gateway, 12 Doctor scenarios twice, and 202 migration tests pass. The conflict-only rebase preserves those profile/helper changes. Existing Doctor repairs can rewrite conflicting profile/allow settings; tested helper policy access survives.

## Consumers

CLI, wizard, setup repair, Gateway catalog, and Tools UI share existing owners. Full also selects available optional plugin tools.

## Invalidation

Existing config reload and catalog refresh remain unchanged.

## Tests

412 core/plugin tests and 152 UI tests pass on the earlier proof merge; 54 affected UI tests pass after the conflict-only rebase. Type-aware changed lint, core types, script/root types, format, architecture, unused-export, UI size, and docs checks pass.

CI corrections move the two optional-plugin cases into a focused test and update the full settings save/reload test. All 134 cases pass locally, including the repaired E2E, and the new file-growth check passes. Production behavior is unchanged.

The prior CI run also hit Slack test/type failures from #150608, reproduced on its main and absent on its parent. Main now fixes those separately in `8f463a22`; this PR carries no Slack edits.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…enclaw#150656)

Complete the Slack Socket Mode envelope-guard construction repair following openclaw#150608 by @pash-openai. Require an explicit acknowledgement callback and bind the SDK sender during receiver construction, preserving SDK ownership of serialization and transport, event-less envelope acknowledgements, and continued ordinary message delivery.

Complete the receiver fixture and await the Enterprise startup fixture's actual start signal while retaining the exact call-count assertion. No operator action, configuration change, or migration is required.

Validation: 3,063 Slack tests across 165 files and full test typechecking passed on the patch-identical reviewed revision. Exact-head CI run 35190855262 is green; the scoped-clean review and exact-head ClawSweeper review have no actionable findings. Transport proof uses the real Slack SDK over isolated loopback sockets.

Related: openclaw#150608, openclaw#150630
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…penclaw#150596)

The diff includes an unchanged four-test file split to meet the line limit; production shrinks by 54 lines.

## What Problem This Solves

New local setups use Coding, which excludes messaging. The existing `openclaw` setup helper is also missing from the tool catalog.

## Why This Change Was Made

The owner approved Full for unprofiled local onboarding, including reruns, and the helper's group allow/deny membership. This intentionally revises openclaw#39012. The onboarding default has one writer. Security and Agents now save Full consistently; the UI uses the canonical tool catalog instead of a duplicate list.

## User Impact

New setups get broad tool selection. “Available tools” is distinct from “Execution permissions”; Full does not mean Full Access.

## Evidence

Real isolated onboarding: `coding` before → `full` after. [Commands and browser proof](https://gist.github.com/obviyus/3ba9dd83878ff416c0c462468926e79a).

| Before | After |
| --- | --- |
| ![Security before](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/2a71c2931e6ab1106951669898da69b298200603/before-security.png) | ![Security after](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/8a283ae74173f52403f233bd954180dc9162ed11/after-security.png) |
| ![Catalog before](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/e309d6966c18457200c4a4b3095a5feda77173a1/before-catalog.png) | ![Catalog after](https://gist.githubusercontent.com/obviyus/3ba9dd83878ff416c0c462468926e79a/raw/1bc4551e27cdd72675119ec96c078dab10e73c36/after-catalog.png) |

## Compatibility

No migration or new settings. Existing explicit profiles and independent execution rules stay intact during normal upgrade. Re-onboarding an unprofiled config selects Full. Helper membership extends automation/OpenClaw group allows **and denies**; owner and sandbox checks remain.

[Compatibility proof](openclaw#150596 (comment)): published 2026.9.3 updater → candidate `d80239aace2d`, healthy Gateway, 12 Doctor scenarios twice, and 202 migration tests pass. The conflict-only rebase preserves those profile/helper changes. Existing Doctor repairs can rewrite conflicting profile/allow settings; tested helper policy access survives.

## Consumers

CLI, wizard, setup repair, Gateway catalog, and Tools UI share existing owners. Full also selects available optional plugin tools.

## Invalidation

Existing config reload and catalog refresh remain unchanged.

## Tests

412 core/plugin tests and 152 UI tests pass on the earlier proof merge; 54 affected UI tests pass after the conflict-only rebase. Type-aware changed lint, core types, script/root types, format, architecture, unused-export, UI size, and docs checks pass.

CI corrections move the two optional-plugin cases into a focused test and update the full settings save/reload test. All 134 cases pass locally, including the repaired E2E, and the new file-growth check passes. Production behavior is unchanged.

The prior CI run also hit Slack test/type failures from openclaw#150608, reproduced on its main and absent on its parent. Main now fixes those separately in `96195a16`; this PR carries no Slack edits.

Co-authored-by: Ayaan Zaidi <[email protected]>
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 size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant