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

推荐订阅源

Vercel News
Vercel News
博客园 - 司徒正美
C
Check Point Blog
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
IT之家
IT之家
B
Blog
博客园_首页
量子位
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
J
Java Code Geeks
H
Help Net Security
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
D
DataBreaches.Net
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
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
test: dedupe node event mock calls · openclaw/openclaw@9b...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -192,13 +192,21 @@ function expectFields(value: unknown, expected: Record<string, unknown>): void {

192192

}

193193

}

194194195+

function mockCall(mock: { mock: { calls: unknown[][] } }, index = 0) {

196+

return mock.mock.calls.at(index);

197+

}

198+199+

function mockCallArg(mock: { mock: { calls: unknown[][] } }, index = 0, argIndex = 0) {

200+

return mockCall(mock, index)?.at(argIndex);

201+

}

202+195203

function expectPresencePersistCall(

196204

mock: ReturnType<typeof vi.fn>,

197205

deviceId: string,

198206

reason: string,

199207

): void {

200208

expect(mock).toHaveBeenCalledTimes(1);

201-

const [actualDeviceId, metadata] = mock.mock.calls[0] ?? [];

209+

const [actualDeviceId, metadata] = mockCall(mock) ?? [];

202210

expect(actualDeviceId).toBe(deviceId);

203211

expectFields(metadata, { lastSeenReason: reason });

204212

const lastSeenAtMs = (metadata as { lastSeenAtMs?: unknown } | undefined)?.lastSeenAtMs;

@@ -610,7 +618,7 @@ describe("voice transcript events", () => {

610618

});

611619612620

expect(agentCommandMock).toHaveBeenCalledTimes(1);

613-

const [opts] = agentCommandMock.mock.calls[0] ?? [];

621+

const opts = mockCallArg(agentCommandMock);

614622

expectFields(opts, {

615623

message: "check provenance",

616624

deliver: false,

@@ -625,7 +633,7 @@ describe("voice transcript events", () => {

625633

expect(typeof optsRecord.runId).toBe("string");

626634

expect(optsRecord.runId).not.toBe(optsRecord.sessionId);

627635

expect(addChatRun).toHaveBeenCalledTimes(1);

628-

const [runId, runMetadata] = addChatRun.mock.calls[0] ?? [];

636+

const [runId, runMetadata] = mockCall(addChatRun) ?? [];

629637

expect(runId).toBe(optsRecord.runId);

630638

const clientRunId = (runMetadata as { clientRunId?: unknown } | undefined)?.clientRunId;

631639

expect(typeof clientRunId).toBe("string");

@@ -649,7 +657,7 @@ describe("voice transcript events", () => {

649657650658

expect(agentCommandMock).toHaveBeenCalledTimes(1);

651659

expect(warn).toHaveBeenCalledTimes(1);

652-

expect(String(warn.mock.calls[0]?.[0])).toContain("voice session-store update failed");

660+

expect(String(mockCallArg(warn))).toContain("voice session-store update failed");

653661

});

654662655663

it("preserves existing session metadata when touching the store for voice transcripts", async () => {

@@ -928,7 +936,7 @@ describe("agent request events", () => {

928936

});

929937930938

expect(agentCommandMock).toHaveBeenCalledTimes(1);

931-

const [opts] = agentCommandMock.mock.calls[0] ?? [];

939+

const opts = mockCallArg(agentCommandMock);

932940

expectFields(opts, {

933941

message: "summarize this",

934942

sessionKey: "agent:main:main",

@@ -937,9 +945,7 @@ describe("agent request events", () => {

937945

to: undefined,

938946

});

939947

expect(warn).toHaveBeenCalledTimes(1);

940-

expect(String(warn.mock.calls[0]?.[0])).toContain(

941-

"agent delivery disabled node=node-route-miss",

942-

);

948+

expect(String(mockCallArg(warn))).toContain("agent delivery disabled node=node-route-miss");

943949

});

944950945951

it("reuses the current session route when delivery target is omitted", async () => {

@@ -963,15 +969,16 @@ describe("agent request events", () => {

963969

});

964970965971

expect(agentCommandMock).toHaveBeenCalledTimes(1);

966-

const [opts] = agentCommandMock.mock.calls[0] ?? [];

972+

const opts = mockCallArg(agentCommandMock);

967973

expectFields(opts, {

968974

message: "route on session",

969975

sessionKey: "agent:main:main",

970976

deliver: true,

971977

channel: "telegram",

972978

to: "123",

973979

});

974-

expect(opts.runId).toBe(opts.sessionId);

980+

const optsRecord = opts as Record<string, unknown>;

981+

expect(optsRecord.runId).toBe(optsRecord.sessionId);

975982

});

976983977984

it("passes supportsInlineImages false for text-only node-session models", async () => {

@@ -1009,7 +1016,7 @@ describe("agent request events", () => {

10091016

});

1010101710111018

expect(parseMessageWithAttachmentsMock).toHaveBeenCalledTimes(1);

1012-

const parseCall = parseMessageWithAttachmentsMock.mock.calls[0];

1019+

const parseCall = mockCall(parseMessageWithAttachmentsMock);

10131020

expect(parseCall?.[0]).toBe("describe");

10141021

expect(Array.isArray(parseCall?.[1])).toBe(true);

10151022

expectFields(parseCall?.[2], { supportsInlineImages: false });