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

推荐订阅源

A
About on SuperTechFans
G
Google Developers Blog
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
云风的 BLOG
云风的 BLOG
小众软件
小众软件
月光博客
月光博客
Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理
P
Proofpoint News Feed
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
The Cloudflare Blog
博客园_首页
美团技术团队
大猫的无限游戏
大猫的无限游戏
B
Blog
IT之家
IT之家
Jina AI
Jina AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

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: tighten dispatch acp lifecycle assertions · opencla...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -1889,8 +1889,8 @@ describe("dispatchReplyFromConfig", () => {

18891889

});

1890189018911891

expect(dispatcher.sendToolResult).toHaveBeenCalledTimes(1);

1892-

expect(dispatcher.sendToolResult).toHaveBeenCalledWith(

1893-

expect.objectContaining({ mediaUrl: "https://example.com/tts-preview.opus" }),

1892+

expect(firstToolResultPayload(dispatcher)?.mediaUrl).toBe(

1893+

"https://example.com/tts-preview.opus",

18941894

);

18951895

expect(dispatcher.sendFinalReply).toHaveBeenCalledWith({ text: "done" });

18961896

});

@@ -1931,17 +1931,13 @@ describe("dispatchReplyFromConfig", () => {

19311931

});

1932193219331933

expect(dispatcher.sendToolResult).toHaveBeenCalledTimes(1);

1934-

expect(firstToolResultPayload(dispatcher)).toEqual(

1935-

expect.objectContaining({

1936-

channelData: {

1937-

execApproval: {

1938-

approvalId: "117ba06d-1111-2222-3333-444444444444",

1939-

approvalSlug: "117ba06d",

1940-

allowedDecisions: ["allow-once", "allow-always", "deny"],

1941-

},

1942-

},

1943-

}),

1944-

);

1934+

expect(firstToolResultPayload(dispatcher)?.channelData).toStrictEqual({

1935+

execApproval: {

1936+

approvalId: "117ba06d-1111-2222-3333-444444444444",

1937+

approvalSlug: "117ba06d",

1938+

allowedDecisions: ["allow-once", "allow-always", "deny"],

1939+

},

1940+

});

19451941

expect(dispatcher.sendFinalReply).toHaveBeenCalledWith({ text: "NO_REPLY" });

19461942

});

19471943

@@ -2059,21 +2055,21 @@ describe("dispatchReplyFromConfig", () => {

20592055

await dispatchReplyFromConfig({ ctx, cfg, dispatcher, replyResolver });

2060205620612057

expect(replyResolver).not.toHaveBeenCalled();

2062-

expect(runtime.ensureSession).toHaveBeenCalledWith(

2063-

expect.objectContaining({

2064-

sessionKey: "agent:codex-acp:session-1",

2065-

agent: "codex",

2066-

mode: "persistent",

2067-

}),

2068-

);

2058+

const ensureSessionOptions = runtime.ensureSession.mock.calls[0]?.[0] as

2059+

| { agent?: unknown; mode?: unknown; sessionKey?: unknown }

2060+

| undefined;

2061+

expect(ensureSessionOptions?.sessionKey).toBe("agent:codex-acp:session-1");

2062+

expect(ensureSessionOptions?.agent).toBe("codex");

2063+

expect(ensureSessionOptions?.mode).toBe("persistent");

20692064

const blockCalls = (dispatcher.sendBlockReply as ReturnType<typeof vi.fn>).mock.calls;

20702065

expect(blockCalls.length).toBeGreaterThan(0);

20712066

const streamedText = blockCalls.map((call) => (call[0] as ReplyPayload).text ?? "").join("");

20722067

expect(streamedText).toContain("hello");

20732068

expect(streamedText).toContain("world");

2074-

expect(dispatcher.sendFinalReply).toHaveBeenCalledWith(

2075-

expect.objectContaining({ text: "hello world" }),

2076-

);

2069+

const finalPayload = (dispatcher.sendFinalReply as Mock).mock.calls[0]?.[0] as

2070+

| ReplyPayload

2071+

| undefined;

2072+

expect(finalPayload?.text).toBe("hello world");

20772073

});

2078207420792075

it("emits lifecycle end for ACP turns using the current run id", async () => {

@@ -2122,16 +2118,20 @@ describe("dispatchReplyFromConfig", () => {

21222118

},

21232119

});

212421202125-

expect(agentEventMocks.emitAgentEvent).toHaveBeenCalledWith(

2126-

expect.objectContaining({

2127-

runId: "run-acp-lifecycle-end",

2128-

sessionKey: "agent:codex-acp:session-1",

2129-

stream: "lifecycle",

2130-

data: expect.objectContaining({

2131-

phase: "end",

2132-

}),

2133-

}),

2134-

);

2121+

const lifecycleEvent = agentEventMocks.emitAgentEvent.mock.calls

2122+

.map(

2123+

(call) =>

2124+

call[0] as {

2125+

data?: { phase?: unknown };

2126+

runId?: unknown;

2127+

sessionKey?: unknown;

2128+

stream?: unknown;

2129+

},

2130+

)

2131+

.find((event) => event.runId === "run-acp-lifecycle-end");

2132+

expect(lifecycleEvent?.sessionKey).toBe("agent:codex-acp:session-1");

2133+

expect(lifecycleEvent?.stream).toBe("lifecycle");

2134+

expect(lifecycleEvent?.data?.phase).toBe("end");

21352135

});

2136213621372137

it("emits lifecycle error for ACP turn failures using the current run id", async () => {

@@ -2184,17 +2184,21 @@ describe("dispatchReplyFromConfig", () => {

21842184

},

21852185

});

218621862187-

expect(agentEventMocks.emitAgentEvent).toHaveBeenCalledWith(

2188-

expect.objectContaining({

2189-

runId: "run-acp-lifecycle-error",

2190-

sessionKey: "agent:codex-acp:session-1",

2191-

stream: "lifecycle",

2192-

data: expect.objectContaining({

2193-

phase: "error",

2194-

error: expect.stringContaining("ACP exploded"),

2195-

}),

2196-

}),

2197-

);

2187+

const lifecycleEvent = agentEventMocks.emitAgentEvent.mock.calls

2188+

.map(

2189+

(call) =>

2190+

call[0] as {

2191+

data?: { error?: unknown; phase?: unknown };

2192+

runId?: unknown;

2193+

sessionKey?: unknown;

2194+

stream?: unknown;

2195+

},

2196+

)

2197+

.find((event) => event.runId === "run-acp-lifecycle-error");

2198+

expect(lifecycleEvent?.sessionKey).toBe("agent:codex-acp:session-1");

2199+

expect(lifecycleEvent?.stream).toBe("lifecycle");

2200+

expect(lifecycleEvent?.data?.phase).toBe("error");

2201+

expect(String(lifecycleEvent?.data?.error)).toContain("ACP exploded");

21982202

});

2199220322002204

it("posts a one-time resolved-session-id notice in thread after the first ACP turn", async () => {