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

推荐订阅源

D
DataBreaches.Net
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
腾讯CDC
博客园 - Franky
Engineering at Meta
Engineering at Meta
C
Check Point Blog
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog
I
InfoQ
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学

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
test: dedupe media reply mock reads · openclaw/openclaw@c...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -260,6 +260,15 @@ function requireRunReplyAgentCall(index = 0) {

260260

return call;

261261

}

262262263+

function requireLastRunReplyAgentCall() {

264+

const calls = vi.mocked(runReplyAgent).mock.calls;

265+

const call = calls[calls.length - 1]?.[0];

266+

if (!call) {

267+

throw new Error("last runReplyAgent call missing");

268+

}

269+

return call;

270+

}

271+263272

describe("runPreparedReply media-only handling", () => {

264273

beforeAll(async () => {

265274

({ runPreparedReply } = await import("./get-reply-run.js"));

@@ -308,7 +317,7 @@ describe("runPreparedReply media-only handling", () => {

308317

it("propagates non-visible assistant silence for group runs", async () => {

309318

await runPreparedReply(baseParams());

310319311-

let call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

320+

let call = requireLastRunReplyAgentCall();

312321

expect(call?.followupRun.run.allowEmptyAssistantReplyAsSilent).toBe(true);

313322314323

await runPreparedReply(

@@ -317,7 +326,7 @@ describe("runPreparedReply media-only handling", () => {

317326

}),

318327

);

319328320-

call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

329+

call = requireLastRunReplyAgentCall();

321330

expect(call?.followupRun.run.allowEmptyAssistantReplyAsSilent).toBe(true);

322331

});

323332

@@ -346,7 +355,7 @@ describe("runPreparedReply media-only handling", () => {

346355

}),

347356

);

348357349-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

358+

const call = requireLastRunReplyAgentCall();

350359

expect(call?.followupRun.run.allowEmptyAssistantReplyAsSilent).toBe(false);

351360

});

352361

@@ -445,7 +454,7 @@ describe("runPreparedReply media-only handling", () => {

445454

}),

446455

);

447456448-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

457+

const call = requireLastRunReplyAgentCall();

449458

expect(call?.followupRun.run.allowEmptyAssistantReplyAsSilent).toBe(true);

450459

},

451460

);

@@ -482,7 +491,7 @@ describe("runPreparedReply media-only handling", () => {

482491

}),

483492

);

484493485-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

494+

const call = requireLastRunReplyAgentCall();

486495

expect(call?.followupRun.run.allowEmptyAssistantReplyAsSilent).toBe(false);

487496

});

488497

@@ -1044,7 +1053,7 @@ describe("runPreparedReply media-only handling", () => {

10441053

previousRun.complete();

1045105410461055

await expect(runPromise).resolves.toEqual({ text: "ok" });

1047-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

1056+

const call = requireLastRunReplyAgentCall();

10481057

expect(call?.followupRun.run.authProfileId).toBe("profile-after-wait");

10491058

expect(vi.mocked(resolveSessionAuthProfileOverride)).toHaveBeenCalledTimes(1);

10501059

});

@@ -1105,7 +1114,7 @@ describe("runPreparedReply media-only handling", () => {

11051114

rotatedRun.complete();

1106111511071116

await expect(runPromise).resolves.toEqual({ text: "ok" });

1108-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

1117+

const call = requireLastRunReplyAgentCall();

11091118

expect(call?.followupRun.run.sessionId).toBe("session-after-rotation");

11101119

});

11111120

it("continues when the original owner clears before an unrelated run appears", async () => {

@@ -1166,7 +1175,7 @@ describe("runPreparedReply media-only handling", () => {

11661175

previousRun.complete();

1167117611681177

await expect(runPromise).resolves.toEqual({ text: "ok" });

1169-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

1178+

const call = requireLastRunReplyAgentCall();

11701179

expect(call?.commandBody).toContain("System: [t] Initial event.");

11711180

expect(call?.commandBody).not.toContain("System: [t] Post-compaction context.");

11721181

expect(call?.transcriptCommandBody).not.toContain("System: [t] Initial event.");

@@ -1204,7 +1213,7 @@ describe("runPreparedReply media-only handling", () => {

12041213

}),

12051214

);

120612151207-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

1216+

const call = requireLastRunReplyAgentCall();

12081217

expect(call?.commandBody).toContain("what does this mean?");

12091218

expect(call?.commandBody).not.toContain("Reply target of current user message");

12101219

expect(call?.transcriptCommandBody).toBe("what does this mean?");

@@ -1244,7 +1253,7 @@ describe("runPreparedReply media-only handling", () => {

12441253

}),

12451254

);

124612551247-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

1256+

const call = requireLastRunReplyAgentCall();

12481257

expect(call?.commandBody).toContain(heartbeatPrompt);

12491258

expect(call?.followupRun.prompt).toContain(heartbeatPrompt);

12501259

expect(call?.transcriptCommandBody).toBe("[OpenClaw heartbeat poll]");

@@ -1293,7 +1302,7 @@ describe("runPreparedReply media-only handling", () => {

12931302

}),

12941303

);

129513041296-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

1305+

const call = requireLastRunReplyAgentCall();

12971306

expect(buildGroupChatContext).toHaveBeenCalledTimes(1);

12981307

const groupContextParams = requireMockCallArg(

12991308

vi.mocked(buildGroupChatContext),

@@ -1360,7 +1369,7 @@ describe("runPreparedReply media-only handling", () => {

13601369

}),

13611370

);

136213711363-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

1372+

const call = requireLastRunReplyAgentCall();

13641373

expect(call?.commandBody).toContain("A new session was started via /new or /reset.");

13651374

expect(call?.commandBody).toContain("Conversation info (untrusted metadata):");

13661375

expect(call?.commandBody).toContain("Sender (untrusted metadata):");

@@ -1406,7 +1415,7 @@ describe("runPreparedReply media-only handling", () => {

14061415

}),

14071416

);

140814171409-

const call = vi.mocked(runReplyAgent).mock.calls.at(-1)?.[0];

1418+

const call = requireLastRunReplyAgentCall();

14101419

expect(call?.commandBody).toContain("A new session was started via /new or /reset.");

14111420

expect(call?.commandBody).toContain("summarize my workspace");

14121421

expect(call?.transcriptCommandBody).toBe("summarize my workspace");