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

推荐订阅源

博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
罗磊的独立博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
宝玉的分享
宝玉的分享
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
N
Netflix TechBlog - Medium
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
美团技术团队
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | 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 after tool call hook assertions · openclaw/...
shakkernerd · 2026-05-11 · via Recent Commits to openclaw:main

@@ -93,8 +93,10 @@ function expectAfterToolCallPayload(params: {

9393

expectedContext: Record<string, unknown>;

9494

}) {

9595

const { event, context } = requireAfterToolCallCall(params.index);

96-

expect(event).toEqual(expect.objectContaining(params.expectedEvent));

97-

expect(context).toEqual(expect.objectContaining(params.expectedContext));

96+

const { durationMs, ...stableEvent } = event;

97+

expect(typeof durationMs).toBe("number");

98+

expect(stableEvent).toEqual(params.expectedEvent);

99+

expect(context).toEqual(params.expectedContext);

98100

}

99101100102

let handleToolExecutionStart: typeof import("../agents/pi-embedded-subscribe.handlers.tools.js").handleToolExecutionStart;

@@ -155,6 +157,7 @@ describe("after_tool_call hook wiring", () => {

155157

error: undefined,

156158

runId: "test-run-1",

157159

toolCallId: "wired-hook-call-1",

160+

result: { content: [{ type: "text", text: "file contents" }] },

158161

},

159162

expectedContext: {

160163

toolName: "read",

@@ -165,7 +168,6 @@ describe("after_tool_call hook wiring", () => {

165168

toolCallId: "wired-hook-call-1",

166169

},

167170

});

168-

expect(typeof getAfterToolCallCall().event?.durationMs).toBe("number");

169171

});

170172171173

it("includes error in after_tool_call event on tool failure", async () => {

@@ -279,13 +281,41 @@ describe("after_tool_call hook wiring", () => {

279281

expect(hookMocks.runner.runAfterToolCall).toHaveBeenCalledTimes(2);

280282

expectAfterToolCallPayload({

281283

index: 0,

282-

expectedEvent: { runId: "run-a", params: { path: "/tmp/path-a.txt" } },

283-

expectedContext: {},

284+

expectedEvent: {

285+

toolName: "read",

286+

params: { path: "/tmp/path-a.txt" },

287+

runId: "run-a",

288+

toolCallId: sharedToolCallId,

289+

result: { content: [{ type: "text", text: "done-a" }] },

290+

error: undefined,

291+

},

292+

expectedContext: {

293+

toolName: "read",

294+

agentId: "agent-a",

295+

sessionKey: "session-a",

296+

sessionId: "ephemeral-a",

297+

runId: "run-a",

298+

toolCallId: sharedToolCallId,

299+

},

284300

});

285301

expectAfterToolCallPayload({

286302

index: 1,

287-

expectedEvent: { runId: "run-b", params: { path: "/tmp/path-b.txt" } },

288-

expectedContext: {},

303+

expectedEvent: {

304+

toolName: "read",

305+

params: { path: "/tmp/path-b.txt" },

306+

runId: "run-b",

307+

toolCallId: sharedToolCallId,

308+

result: { content: [{ type: "text", text: "done-b" }] },

309+

error: undefined,

310+

},

311+

expectedContext: {

312+

toolName: "read",

313+

agentId: "agent-b",

314+

sessionKey: "session-b",

315+

sessionId: "ephemeral-b",

316+

runId: "run-b",

317+

toolCallId: sharedToolCallId,

318+

},

289319

});

290320

});

291321

});