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

推荐订阅源

F
Fortinet All Blogs
有赞技术团队
有赞技术团队
量子位
N
Netflix TechBlog - Medium
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
V2EX
IT之家
IT之家
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

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 codex native hook relay assertions · opencl...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -1685,24 +1685,16 @@ describe("runCodexAppServerAttempt", () => {

16851685

await run;

1686168616871687

const startRequest = harness.requests.find((request) => request.method === "thread/start");

1688-

expect(startRequest?.params).toEqual(

1689-

expect.objectContaining({

1690-

config: expect.objectContaining({

1691-

"features.codex_hooks": true,

1692-

"hooks.PreToolUse": [

1693-

expect.objectContaining({

1694-

hooks: [

1695-

expect.objectContaining({

1696-

type: "command",

1697-

timeout: 9,

1698-

command: expect.stringContaining("--event pre_tool_use --timeout 4321"),

1699-

}),

1700-

],

1701-

}),

1702-

],

1703-

}),

1704-

}),

1705-

);

1688+

const startConfig = (startRequest?.params as { config?: Record<string, unknown> } | undefined)

1689+

?.config;

1690+

expect(startConfig?.["features.codex_hooks"]).toBe(true);

1691+

const preToolUseHooks = startConfig?.["hooks.PreToolUse"] as

1692+

| Array<{ hooks?: Array<{ command?: string; timeout?: number; type?: string }> }>

1693+

| undefined;

1694+

const preToolUseCommand = preToolUseHooks?.[0]?.hooks?.[0];

1695+

expect(preToolUseCommand?.type).toBe("command");

1696+

expect(preToolUseCommand?.timeout).toBe(9);

1697+

expect(preToolUseCommand?.command).toContain("--event pre_tool_use --timeout 4321");

17061698

const relayId = extractRelayIdFromThreadRequest(startRequest?.params);

17071699

expect(nativeHookRelayTesting.getNativeHookRelayRegistrationForTests(relayId)).toBeUndefined();

17081700

});

@@ -1777,27 +1769,17 @@ describe("runCodexAppServerAttempt", () => {

17771769

await harness.waitForMethod("turn/start");

1778177017791771

const startRequest = harness.requests.find((request) => request.method === "thread/start");

1780-

expect(startRequest?.params).toEqual(

1781-

expect.objectContaining({

1782-

config: expect.objectContaining({

1783-

"features.codex_hooks": true,

1784-

"hooks.PreToolUse": expect.any(Array),

1785-

"hooks.PostToolUse": expect.any(Array),

1786-

"hooks.Stop": expect.any(Array),

1787-

}),

1788-

}),

1789-

);

1790-

expect(startRequest?.params).toEqual(

1791-

expect.objectContaining({

1792-

config: expect.not.objectContaining({

1793-

"hooks.PermissionRequest": expect.anything(),

1794-

}),

1795-

}),

1796-

);

1772+

const startConfig = (startRequest?.params as { config?: Record<string, unknown> } | undefined)

1773+

?.config;

1774+

expect(startConfig?.["features.codex_hooks"]).toBe(true);

1775+

expect(Array.isArray(startConfig?.["hooks.PreToolUse"])).toBe(true);

1776+

expect(Array.isArray(startConfig?.["hooks.PostToolUse"])).toBe(true);

1777+

expect(Array.isArray(startConfig?.["hooks.Stop"])).toBe(true);

1778+

expect(startConfig).not.toHaveProperty("hooks.PermissionRequest");

17971779

const relayId = extractRelayIdFromThreadRequest(startRequest?.params);

1798-

expect(nativeHookRelayTesting.getNativeHookRelayRegistrationForTests(relayId)).toMatchObject({

1799-

allowedEvents: ["pre_tool_use", "post_tool_use", "before_agent_finalize"],

1800-

});

1780+

expect(

1781+

nativeHookRelayTesting.getNativeHookRelayRegistrationForTests(relayId)?.allowedEvents,

1782+

).toEqual(["pre_tool_use", "post_tool_use", "before_agent_finalize"]);

1801178318021784

await harness.completeTurn({ threadId: "thread-1", turnId: "turn-1" });

18031785

await run;

@@ -1823,18 +1805,14 @@ describe("runCodexAppServerAttempt", () => {

18231805

await harness.waitForMethod("turn/start");

1824180618251807

const startRequest = harness.requests.find((request) => request.method === "thread/start");

1826-

expect(startRequest?.params).toEqual(

1827-

expect.objectContaining({

1828-

config: expect.objectContaining({

1829-

"features.codex_hooks": true,

1830-

"hooks.PermissionRequest": expect.any(Array),

1831-

}),

1832-

}),

1833-

);

1808+

const startConfig = (startRequest?.params as { config?: Record<string, unknown> } | undefined)

1809+

?.config;

1810+

expect(startConfig?.["features.codex_hooks"]).toBe(true);

1811+

expect(Array.isArray(startConfig?.["hooks.PermissionRequest"])).toBe(true);

18341812

const relayId = extractRelayIdFromThreadRequest(startRequest?.params);

1835-

expect(nativeHookRelayTesting.getNativeHookRelayRegistrationForTests(relayId)).toMatchObject({

1836-

allowedEvents: ["permission_request"],

1837-

});

1813+

expect(

1814+

nativeHookRelayTesting.getNativeHookRelayRegistrationForTests(relayId)?.allowedEvents,

1815+

).toEqual(["permission_request"]);

1838181618391817

await harness.completeTurn({ threadId: "thread-1", turnId: "turn-1" });

18401818

await run;