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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
GbyAI
GbyAI
M
MIT News - Artificial intelligence
美团技术团队
罗磊的独立博客
雷峰网
雷峰网
量子位
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
D
Docker
小众软件
小众软件
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
WordPress大学
WordPress大学
V
V2EX
博客园_首页
腾讯CDC
The Cloudflare Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

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: cap slack block fallback text · openclaw/openclaw@30...
steipete · 2026-04-30 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -77,6 +77,7 @@ Docs: https://docs.openclaw.ai

7777

- Slack/commands: cap native command argument-menu fallback rows to Slack's message block limit, so large plugin choice lists no longer make Slack reject the generated menu. Thanks @slackapi.

7878

- Slack/commands: drop fallback command argument buttons whose encoded values exceed Slack's button-value limit, so one oversized plugin choice no longer makes Slack reject the whole menu. Thanks @slackapi.

7979

- Slack/messages: merge message-tool presentation and interactive blocks on Slack sends, so buttons and selects are no longer dropped when a structured message body is also present. Thanks @slackapi.

80+

- Slack/messages: cap Block Kit fallback text to Slack's send limit while preserving the rendered blocks, so long context fallbacks no longer make rich Slack messages fail with `msg_too_long`. Thanks @slackapi.

8081

- Channels/WhatsApp: require Baileys outbound message ids before marking auto-replies delivered, so transcript text and ack reactions no longer make failed group replies look sent. Fixes #49225. Thanks @TinyTb.

8182

- CLI/update: scope packaged Node compile caches by OpenClaw version and install metadata, so global installs no longer reuse stale compiled chunks after package updates. Thanks @pashpashpash.

8283

- Channels/Voice call: keep pre-auth webhook in-flight limiting active when socket remote address metadata is missing, so slow-body requests from stripped-IP proxy paths still share the fallback bucket. (#74453) Thanks @davidangularme.

Original file line numberDiff line numberDiff line change

@@ -4,6 +4,7 @@ import { createSlackSendTestClient, installSlackBlockTestMocks } from "./blocks.

44

installSlackBlockTestMocks();

55

const { sendMessageSlack } = await import("./send.js");

66

const SLACK_TEST_CFG = { channels: { slack: { botToken: "xoxb-test" } } };

7+

const SLACK_TEXT_LIMIT = 8000;

78
89

describe("sendMessageSlack NO_REPLY guard", () => {

910

it("suppresses NO_REPLY text before any Slack API call", async () => {

@@ -170,6 +171,36 @@ describe("sendMessageSlack blocks", () => {

170171

);

171172

});

172173
174+

it("caps long fallback text while preserving blocks", async () => {

175+

const client = createSlackSendTestClient();

176+

const longContextText = "a".repeat(3000);

177+

const blocks = [

178+

{

179+

type: "context",

180+

elements: [

181+

{ type: "mrkdwn", text: longContextText },

182+

{ type: "mrkdwn", text: longContextText },

183+

{ type: "mrkdwn", text: longContextText },

184+

],

185+

},

186+

];

187+
188+

await sendMessageSlack("channel:C123", "", {

189+

token: "xoxb-test",

190+

cfg: SLACK_TEST_CFG,

191+

client,

192+

blocks,

193+

});

194+
195+

expect(client.chat.postMessage).toHaveBeenCalledWith(

196+

expect.objectContaining({

197+

text: expect.stringMatching(/$/),

198+

blocks,

199+

}),

200+

);

201+

expect(client.chat.postMessage.mock.calls[0]?.[0].text).toHaveLength(SLACK_TEXT_LIMIT);

202+

});

203+
173204

it("rejects blocks combined with mediaUrl", async () => {

174205

const client = createSlackSendTestClient();

175206

await expect(

Original file line numberDiff line numberDiff line change

@@ -26,6 +26,7 @@ import { SLACK_TEXT_LIMIT } from "./limits.js";

2626

import { loadOutboundMediaFromUrl } from "./runtime-api.js";

2727

import { parseSlackTarget } from "./targets.js";

2828

import { resolveSlackBotToken } from "./token.js";

29+

import { truncateSlackText } from "./truncate.js";

2930

const SLACK_UPLOAD_SSRF_POLICY = {

3031

allowedHostnames: ["*.slack.com", "*.slack-edge.com", "*.slack-files.com"],

3132

allowRfc2544BenchmarkRange: true,

@@ -411,7 +412,10 @@ async function sendMessageSlackQueued(params: {

411412

if (opts.mediaUrl) {

412413

throw new Error("Slack send does not support blocks with mediaUrl");

413414

}

414-

const fallbackText = trimmedMessage || buildSlackBlocksFallbackText(blocks);

415+

const fallbackText = truncateSlackText(

416+

trimmedMessage || buildSlackBlocksFallbackText(blocks),

417+

SLACK_TEXT_LIMIT,

418+

);

415419

const response = await postSlackMessageBestEffort({

416420

client,

417421

channelId,