Repository navigation
[AI-assisted] fix(slack): enable native socket reconnect - #78158
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. at source and dependency-contract level: origin/main passes autoReconnectEnabled: false while OpenClaw docs and the pinned Slack SDK expect native reconnect on Socket Mode drops. I did not establish a live Slack disconnect or pong-timeout reproduction. Real behavior proof Next step before merge Security Review detailsBest possible solution: Merge the narrow Slack plugin fix after contributor-supplied live Socket Mode reconnect evidence and normal green or accepted gates, while preserving the existing teardown safeguards. Do we have a high-confidence way to reproduce the issue? Yes at source and dependency-contract level: origin/main passes autoReconnectEnabled: false while OpenClaw docs and the pinned Slack SDK expect native reconnect on Socket Mode drops. I did not establish a live Slack disconnect or pong-timeout reproduction. Is this the best way to solve the issue? Yes for the code direction: restoring Slack SDK native reconnect and observing native start failures is the narrowest maintainable fix. Merge should still wait for live runtime proof because this changes transport recovery behavior. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 94b43127d0c0. Re-review progress:
|
08bec49 to
89223eb
Compare
|
Maintenance update: rebased this branch onto current openclaw/main (82c4fd8) and force-pushed \89223eb9d5. The previous failing CI was \checks-node-core-runtime-infra-state\ timing out in unrelated \src/infra/outbound/message-action-runner.core-send.test.ts, outside this Slack PR's changed files, and the branch was also dirty against current main.\n\nFocused validation after the rebase passed:\n- \corepack pnpm test extensions/slack/src/monitor/provider.interop.test.ts extensions/slack/src/monitor/provider.reconnect.test.ts extensions/slack/src/config-schema.test.ts\ — 44 passed\n- \corepack pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/slack/src/monitor/provider-support.ts extensions/slack/src/monitor/provider.interop.test.ts\ — passed\n- \corepack pnpm check:changed\ — passed\n- \git diff --check origin/main...HEAD\ — passed |
89223eb to
2794e28
Compare
|
Second maintenance update: upstream moved again after the first rebase, so I rebased this branch onto current openclaw/main (1ded8de) and force-pushed \2794e283d4.\n\nFocused Slack validation remains green:\n- \corepack pnpm test extensions/slack/src/monitor/provider.interop.test.ts extensions/slack/src/monitor/provider.reconnect.test.ts extensions/slack/src/config-schema.test.ts\ — 44 passed\n- targeted \oxfmt --check\ — passed\n- \corepack pnpm check:changed\ — passed\n- \git diff --check origin/main...HEAD\ — passed\n\nI also checked the fresh \check:test-types\ failure from the prior pushed head: it was \src/agents/model-fallback.test.ts(150,63): Property 'env' is missing..., which is outside this Slack PR's changed files. I reproduced that type-check failure locally on the current base via the no-space drive mapping, so I am not folding an unrelated model-fallback test fix into this Slack PR. |
2794e28 to
e121ca1
Compare
|
Rebased this branch onto current New head: Focused validation after the rebase:
|
|
Fresh CI after the rebase is red only in shared checks outside this PR's diff:
Those files are not part of this PR's changes, so I am not folding unrelated gateway/plugin test cleanup into this branch. |
e121ca1 to
519159b
Compare
|
Maintenance update: rebased this branch onto current The only conflict was in Focused validation after the rebase:
Fresh CI has started on the new head. |
519159b to
42283de
Compare
|
Rebased this branch onto current Validation after the rebase:
The previous |
42283de to
d83d55b
Compare
|
Maintenance update: rebased this branch onto current The only rebase conflict was I also ran the local Codex review loop. It found that enabling Slack SDK native reconnects could leave reconnect-start failures unobserved because Validation after the rebase/update:
Fresh CI has started on the new head. |
d83d55b to
76bab2d
Compare
|
Follow-up update: force-pushed The issue was a too-loose TypeScript annotation in the reconnect observer: the patched delayed reconnect callback used Additional validation on the updated head from a no-space local worktree:
Fresh CI has restarted on |
76bab2d to
6880113
Compare
6880113 to
0bf79c5
Compare
|
Landed via rebase onto
Verification:
Thanks @brokemac79. |
Summary
SocketModeReceiver.Fixes #77933.
Real behavior proof
Behavior or issue addressed: Slack Socket Mode was constructed with
autoReconnectEnabled: false, so pong timeouts could not use the Slack SDK's native socket reconnect path and instead pushed recovery back toward heavier OpenClaw provider rebuild behavior.Real environment tested: Local Windows checkout of this PR branch at commit
08bec49b97, using Node/pnpm from the repository toolchain.Exact steps or command run after this patch: Inspected the patched
createSlackBoltAppoptions and rangit diff --check,corepack pnpm exec oxfmt --check --threads=1 extensions/slack/src/monitor/provider-support.ts extensions/slack/src/monitor/provider.interop.test.ts extensions/slack/src/monitor/provider.reconnect.test.ts CHANGELOG.md,corepack pnpm test extensions/slack/src/monitor/provider.interop.test.ts extensions/slack/src/monitor/provider.reconnect.test.ts extensions/slack/src/config-schema.test.ts, andcorepack pnpm check:changed.Evidence after fix: Terminal/diff capture from the patched checkout shows the Slack SDK option now enables native reconnect:
The focused Slack test shard also passed:
Observed result after fix:
createSlackBoltAppnow passesautoReconnectEnabled: truetoSocketModeReceiver, and the focused Slack interop/reconnect/config-schema tests pass with the native reconnect expectation.What was not tested: I did not run a live Slack workspace disconnect/pong-timeout session. This proof is source-level plus focused Slack provider regression coverage.
Validation
git diff --checkcorepack pnpm exec oxfmt --check --threads=1 extensions/slack/src/monitor/provider-support.ts extensions/slack/src/monitor/provider.interop.test.ts extensions/slack/src/monitor/provider.reconnect.test.ts CHANGELOG.mdcorepack pnpm test extensions/slack/src/monitor/provider.interop.test.ts extensions/slack/src/monitor/provider.reconnect.test.ts extensions/slack/src/config-schema.test.tscorepack pnpm check:changed