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

推荐订阅源

B
Blog
D
Docker
J
Java Code Geeks
腾讯CDC
Blog — PlanetScale
Blog — PlanetScale
G
Google Developers Blog
M
MIT News - Artificial intelligence
L
LangChain Blog
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
博客园 - Franky
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
N
Netflix TechBlog - Medium
B
Blog RSS Feed
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News

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(feishu): fallback when accepted turns send no visible...
ArthurNie · 2026-06-01 · via Recent Commits to openclaw:main

@@ -19,6 +19,7 @@ const { mockCreateFeishuReplyDispatcher, mockCreateFeishuClient, mockResolveAgen

1919

},

2020

replyOptions: {},

2121

markDispatchIdle: vi.fn(),

22+

ensureNoVisibleReplyFallback: vi.fn(),

2223

})),

2324

mockCreateFeishuClient: vi.fn(),

2425

mockResolveAgentRoute: vi.fn(),

@@ -227,6 +228,20 @@ describe("broadcast dispatch", () => {

227228

lastRoutePolicy: "session",

228229

matchedBy: "default",

229230

});

231+

mockCreateFeishuReplyDispatcher.mockReturnValue({

232+

dispatcher: {

233+

sendToolResult: vi.fn(),

234+

sendBlockReply: vi.fn(),

235+

sendFinalReply: vi.fn(),

236+

waitForIdle: vi.fn(),

237+

getQueuedCounts: vi.fn(() => ({ tool: 0, block: 0, final: 0 })),

238+

getFailedCounts: vi.fn(() => ({ tool: 0, block: 0, final: 0 })),

239+

markComplete: vi.fn(),

240+

},

241+

replyOptions: {},

242+

markDispatchIdle: vi.fn(),

243+

ensureNoVisibleReplyFallback: vi.fn(),

244+

});

230245

mockCreateFeishuClient.mockReturnValue({

231246

contact: {

232247

user: {

@@ -329,6 +344,130 @@ describe("broadcast dispatch", () => {

329344

expect(dispatcherParams?.agentId).toBe("main");

330345

});

331346347+

it("sends no-visible-reply fallback for active broadcast zero-final dispatch", async () => {

348+

mockDispatchReplyFromConfig

349+

.mockResolvedValueOnce({ queuedFinal: false, counts: { final: 1 } })

350+

.mockResolvedValueOnce({

351+

queuedFinal: false,

352+

counts: { final: 0 },

353+

noVisibleReplyFallbackEligible: true,

354+

});

355+

const ensureNoVisibleReplyFallback = vi.fn();

356+

mockCreateFeishuReplyDispatcher.mockReturnValueOnce({

357+

dispatcher: {

358+

sendToolResult: vi.fn(),

359+

sendBlockReply: vi.fn(),

360+

sendFinalReply: vi.fn(),

361+

waitForIdle: vi.fn(),

362+

getQueuedCounts: vi.fn(() => ({ tool: 0, block: 0, final: 0 })),

363+

getFailedCounts: vi.fn(() => ({ tool: 0, block: 0, final: 0 })),

364+

markComplete: vi.fn(),

365+

},

366+

replyOptions: {},

367+

markDispatchIdle: vi.fn(),

368+

ensureNoVisibleReplyFallback,

369+

});

370+

const cfg = createBroadcastConfig();

371+

const event = createBroadcastEvent({

372+

messageId: "msg-broadcast-zero-final",

373+

text: "hello @bot",

374+

botMentioned: true,

375+

});

376+377+

await handleFeishuMessage({

378+

cfg,

379+

event,

380+

botOpenId: "bot-open-id",

381+

runtime: createRuntimeEnv(),

382+

});

383+384+

expect(ensureNoVisibleReplyFallback).toHaveBeenCalledWith(

385+

"broadcast-dispatch-complete-no-visible-reply",

386+

);

387+

});

388+389+

it("sends no-visible-reply fallback for active broadcast failed final delivery", async () => {

390+

mockDispatchReplyFromConfig

391+

.mockResolvedValueOnce({ queuedFinal: false, counts: { final: 1 } })

392+

.mockResolvedValueOnce({

393+

queuedFinal: true,

394+

counts: { final: 1 },

395+

});

396+

const ensureNoVisibleReplyFallback = vi.fn();

397+

mockCreateFeishuReplyDispatcher.mockReturnValueOnce({

398+

dispatcher: {

399+

sendToolResult: vi.fn(),

400+

sendBlockReply: vi.fn(),

401+

sendFinalReply: vi.fn(),

402+

waitForIdle: vi.fn(),

403+

getQueuedCounts: vi.fn(() => ({ tool: 0, block: 0, final: 0 })),

404+

getFailedCounts: vi.fn(() => ({ tool: 0, block: 0, final: 1 })),

405+

markComplete: vi.fn(),

406+

},

407+

replyOptions: {},

408+

markDispatchIdle: vi.fn(),

409+

ensureNoVisibleReplyFallback,

410+

});

411+

const cfg = createBroadcastConfig();

412+

const event = createBroadcastEvent({

413+

messageId: "msg-broadcast-final-failed",

414+

text: "hello @bot",

415+

botMentioned: true,

416+

});

417+418+

await handleFeishuMessage({

419+

cfg,

420+

event,

421+

botOpenId: "bot-open-id",

422+

runtime: createRuntimeEnv(),

423+

});

424+425+

expect(ensureNoVisibleReplyFallback).toHaveBeenCalledWith(

426+

"broadcast-dispatch-complete-no-visible-reply",

427+

);

428+

});

429+430+

it("skips no-visible-reply fallback for source-suppressed active broadcast dispatch", async () => {

431+

mockDispatchReplyFromConfig

432+

.mockResolvedValueOnce({ queuedFinal: false, counts: { final: 1 } })

433+

.mockResolvedValueOnce({

434+

queuedFinal: false,

435+

counts: { final: 0 },

436+

sourceReplyDeliveryMode: "message_tool_only",

437+

noVisibleReplyFallbackEligible: true,

438+

});

439+

const ensureNoVisibleReplyFallback = vi.fn();

440+

mockCreateFeishuReplyDispatcher.mockReturnValueOnce({

441+

dispatcher: {

442+

sendToolResult: vi.fn(),

443+

sendBlockReply: vi.fn(),

444+

sendFinalReply: vi.fn(),

445+

waitForIdle: vi.fn(),

446+

getQueuedCounts: vi.fn(() => ({ tool: 0, block: 0, final: 0 })),

447+

getFailedCounts: vi.fn(() => ({ tool: 0, block: 0, final: 0 })),

448+

markComplete: vi.fn(),

449+

},

450+

replyOptions: {},

451+

markDispatchIdle: vi.fn(),

452+

ensureNoVisibleReplyFallback,

453+

});

454+

const cfg = createBroadcastConfig();

455+

const event = createBroadcastEvent({

456+

messageId: "msg-broadcast-source-suppressed",

457+

text: "hello @bot",

458+

botMentioned: true,

459+

});

460+461+

await handleFeishuMessage({

462+

cfg,

463+

event,

464+

botOpenId: "bot-open-id",

465+

runtime: createRuntimeEnv(),

466+

});

467+468+

expect(ensureNoVisibleReplyFallback).not.toHaveBeenCalled();

469+

});

470+332471

it("skips broadcast dispatch when bot is NOT mentioned (requireMention=true)", async () => {

333472

const cfg = createBroadcastConfig();

334473

const event = createBroadcastEvent({