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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Engineering at Meta
Engineering at Meta
L
LangChain Blog
Jina AI
Jina AI
博客园 - 叶小钗
B
Blog RSS Feed
Recent Announcements
Recent Announcements
H
Help Net Security
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
B
Blog
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客

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(agents): keep queued announces session-only without r...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -10,8 +10,10 @@ import {

1010

sendMessage as runtimeSendMessage,

1111

} from "./subagent-announce-delivery.runtime.js";

1212

import { resolveAnnounceOrigin } from "./subagent-announce-origin.js";

13+

import { resetAnnounceQueuesForTests } from "./subagent-announce-queue.js";

13141415

afterEach(() => {

16+

resetAnnounceQueuesForTests();

1517

__testing.setDepsForTest();

1618

});

1719

@@ -226,6 +228,138 @@ describe("resolveAnnounceOrigin threaded route targets", () => {

226228

});

227229

});

228230231+

describe("deliverSubagentAnnouncement queued delivery", () => {

232+

async function deliverQueuedAnnouncement(params: {

233+

requesterOrigin?: {

234+

channel?: string;

235+

to?: string;

236+

accountId?: string;

237+

threadId?: string | number;

238+

};

239+

}) {

240+

const callGateway = createGatewayMock();

241+

let activityChecks = 0;

242+

__testing.setDepsForTest({

243+

callGateway,

244+

getRequesterSessionActivity: () => ({

245+

sessionId: "paperclip-session",

246+

isActive: activityChecks++ === 0,

247+

}),

248+

loadConfig: () =>

249+

({

250+

messages: {

251+

queue: {

252+

mode: "followup",

253+

debounceMs: 0,

254+

},

255+

},

256+

}) as never,

257+

});

258+259+

const result = await deliverSubagentAnnouncement({

260+

requesterSessionKey: "agent:eng:paperclip:issue:123",

261+

targetRequesterSessionKey: "agent:eng:paperclip:issue:123",

262+

triggerMessage: "child done",

263+

steerMessage: "child done",

264+

requesterOrigin: params.requesterOrigin,

265+

requesterIsSubagent: false,

266+

expectsCompletionMessage: false,

267+

directIdempotencyKey: "announce-no-external-route",

268+

});

269+270+

expect(result).toEqual(

271+

expect.objectContaining({

272+

delivered: true,

273+

path: "queued",

274+

}),

275+

);

276+

await vi.waitFor(() => expect(callGateway).toHaveBeenCalledTimes(1));

277+

return callGateway;

278+

}

279+280+

it("keeps queued announces with no external route session-only", async () => {

281+

const callGateway = await deliverQueuedAnnouncement({});

282+283+

expect(callGateway).toHaveBeenCalledWith(

284+

expect.objectContaining({

285+

method: "agent",

286+

params: expect.objectContaining({

287+

sessionKey: "agent:eng:paperclip:issue:123",

288+

deliver: false,

289+

channel: undefined,

290+

accountId: undefined,

291+

to: undefined,

292+

threadId: undefined,

293+

}),

294+

}),

295+

);

296+

});

297+298+

it("keeps queued announces with channel-only origins session-only", async () => {

299+

const callGateway = await deliverQueuedAnnouncement({

300+

requesterOrigin: {

301+

channel: "slack",

302+

},

303+

});

304+305+

expect(callGateway).toHaveBeenCalledWith(

306+

expect.objectContaining({

307+

params: expect.objectContaining({

308+

deliver: false,

309+

channel: undefined,

310+

to: undefined,

311+

}),

312+

}),

313+

);

314+

});

315+316+

it("keeps queued announces with internal origins session-only", async () => {

317+

const callGateway = await deliverQueuedAnnouncement({

318+

requesterOrigin: {

319+

channel: "webchat",

320+

to: "internal:room",

321+

accountId: "acct-1",

322+

threadId: "thread-1",

323+

},

324+

});

325+326+

expect(callGateway).toHaveBeenCalledWith(

327+

expect.objectContaining({

328+

params: expect.objectContaining({

329+

deliver: false,

330+

channel: undefined,

331+

accountId: undefined,

332+

to: undefined,

333+

threadId: undefined,

334+

}),

335+

}),

336+

);

337+

});

338+339+

it("preserves queued external route fields when channel and target are present", async () => {

340+

const callGateway = await deliverQueuedAnnouncement({

341+

requesterOrigin: {

342+

channel: "slack",

343+

to: "channel:C123",

344+

accountId: "acct-1",

345+

threadId: "171.222",

346+

},

347+

});

348+349+

expect(callGateway).toHaveBeenCalledWith(

350+

expect.objectContaining({

351+

params: expect.objectContaining({

352+

deliver: true,

353+

channel: "slack",

354+

accountId: "acct-1",

355+

to: "channel:C123",

356+

threadId: "171.222",

357+

}),

358+

}),

359+

);

360+

});

361+

});

362+229363

describe("deliverSubagentAnnouncement completion delivery", () => {

230364

it("keeps completion announces session-internal while preserving route context for active requesters", async () => {

231365

const callGateway = createGatewayMock();