惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
I
InfoQ
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
GbyAI
GbyAI
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
美团技术团队
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
M
MIT News - Artificial intelligence
D
Docker
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 叶小钗

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(slack): remove socket reconnect attempt cap so gatewa...
suboss87 · 2026-06-18 · via Recent Commits to openclaw:main

@@ -116,29 +116,25 @@ function resolveStableSlackUserAllowlistEntries(entries: string[]): SlackUserRes

116116

export function formatSlackSocketReconnectMessage(params: {

117117

event: string;

118118

attempt: number;

119-

maxAttempts: number;

120119

delayMs: number;

121120

error?: unknown;

122121

}) {

123-

const maxAttempts = params.maxAttempts > 0 ? String(params.maxAttempts) : "∞";

124122

const suffix = params.error ? ` (${formatUnknownError(params.error)})` : "";

125-

return `slack socket disconnected (${params.event}); reconnecting in ${Math.round(params.delayMs / 1000)}s (attempt ${params.attempt}/${maxAttempts})${suffix}`;

123+

return `slack socket disconnected (${params.event}); reconnecting in ${Math.round(params.delayMs / 1000)}s (attempt ${params.attempt}/)${suffix}`;

126124

}

127125128126

export function formatSlackSocketStartRetryMessage(params: {

129127

attempt: number;

130-

maxAttempts: number;

131128

delayMs: number;

132129

error: unknown;

133130

sdkContext?: string;

134131

}) {

135-

const maxAttempts = params.maxAttempts > 0 ? String(params.maxAttempts) : "∞";

136132

const reason = formatUnknownError(

137133

params.error,

138134

"Slack Socket Mode start failed without error detail",

139135

);

140136

const sdkContext = params.sdkContext?.trim() ? `; last SDK log: ${params.sdkContext.trim()}` : "";

141-

return `slack socket mode failed to start; retry ${params.attempt}/${maxAttempts} in ${Math.round(params.delayMs / 1000)}s reason="${reason}${sdkContext}"`;

137+

return `slack socket mode failed to start; retry ${params.attempt}/ in ${Math.round(params.delayMs / 1000)}s reason="${reason}${sdkContext}"`;

142138

}

143139144140

function parseApiAppIdFromAppToken(raw?: string) {

@@ -568,7 +564,7 @@ export async function monitorSlackProvider(opts: MonitorSlackOpts = {}) {

568564

}

569565

publishSlackDisconnectedStatus(opts.setStatus, disconnect.error);

570566571-

// Bail immediately on non-recoverable auth errors during reconnect too.

567+

// Permanent account and credential failures need operator action.

572568

if (disconnect.error && isNonRecoverableSlackAuthError(disconnect.error)) {

573569

runtime.error?.(

574570

`slack socket mode disconnected due to non-recoverable auth error — skipping channel (${formatUnknownError(disconnect.error)})`,

@@ -579,22 +575,12 @@ export async function monitorSlackProvider(opts: MonitorSlackOpts = {}) {

579575

}

580576581577

reconnectAttempts += 1;

582-

if (

583-

SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 &&

584-

reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts

585-

) {

586-

throw new Error(

587-

`Slack socket mode reconnect max attempts reached (${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts}) after ${disconnect.event}`,

588-

);

589-

}

590-591578

const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);

592579

runtime.log?.(

593580

warn(

594581

formatSlackSocketReconnectMessage({

595582

event: disconnect.event,

596583

attempt: reconnectAttempts,

597-

maxAttempts: SLACK_SOCKET_RECONNECT_POLICY.maxAttempts,

598584

delayMs,

599585

error: disconnect.error,

600586

}),

@@ -607,26 +593,17 @@ export async function monitorSlackProvider(opts: MonitorSlackOpts = {}) {

607593

break;

608594

}

609595

} catch (err) {

610-

// Auth errors (account_inactive, invalid_auth, etc.) are permanent —

611-

// retrying will never succeed and blocks the entire gateway. Fail fast.

612596

if (isNonRecoverableSlackAuthError(err)) {

613597

runtime.error?.(

614598

`slack socket mode failed to start due to non-recoverable auth error — skipping channel (${formatUnknownError(err)})`,

615599

);

616600

throw err;

617601

}

618602

reconnectAttempts += 1;

619-

if (

620-

SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 &&

621-

reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts

622-

) {

623-

throw err;

624-

}

625603

const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);

626604

runtime.error?.(

627605

formatSlackSocketStartRetryMessage({

628606

attempt: reconnectAttempts,

629-

maxAttempts: SLACK_SOCKET_RECONNECT_POLICY.maxAttempts,

630607

delayMs,

631608

error: err,

632609

sdkContext: socketModeLogger.getLastMessage(),