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

推荐订阅源

G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
F
Fortinet All Blogs
H
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
DataBreaches.Net
MyScale Blog
MyScale Blog
B
Blog
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
IT之家
IT之家
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
博客园_首页
L
LangChain Blog
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky

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 codex elicitation mock calls · openclaw/open...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -13,6 +13,22 @@ vi.mock("openclaw/plugin-sdk/agent-harness-runtime", async (importOriginal) => (

13131414

const mockCallGatewayTool = vi.mocked(callGatewayTool);

151516+

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

17+

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

18+

}

19+20+

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

21+

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

22+

}

23+24+

function gatewayToolCall(index = 0) {

25+

return mockCall(mockCallGatewayTool, index);

26+

}

27+28+

function gatewayToolArg(index = 0, argIndex = 0) {

29+

return mockCallArg(mockCallGatewayTool, index, argIndex);

30+

}

31+1632

function createParams(): EmbeddedRunAttemptParams {

1733

return {

1834

sessionKey: "agent:main:session-1",

@@ -262,11 +278,11 @@ describe("Codex app-server elicitation bridge", () => {

262278

content: null,

263279

_meta: null,

264280

});

265-

const approvalRequestCall = mockCallGatewayTool.mock.calls[0];

281+

const approvalRequestCall = gatewayToolCall();

266282

expect(approvalRequestCall?.[0]).toBe("plugin.approval.request");

267283

expect(approvalRequestCall?.[1]).toStrictEqual({ timeoutMs: 130_000 });

268284

expect(approvalRequestCall?.[3]).toStrictEqual({ expectFinal: false });

269-

const approvalRequest = approvalRequestCall?.[2] as {

285+

const approvalRequest = gatewayToolArg(0, 2) as {

270286

description: string;

271287

};

272288

expect(approvalRequest.description).toContain("App: GitHub");

@@ -314,7 +330,7 @@ describe("Codex app-server elicitation bridge", () => {

314330

turnId: "turn-1",

315331

});

316332317-

const approvalRequest = mockCallGatewayTool.mock.calls[0]?.[2] as {

333+

const approvalRequest = gatewayToolArg(0, 2) as {

318334

title: string;

319335

description: string;

320336

};

@@ -369,7 +385,7 @@ describe("Codex app-server elicitation bridge", () => {

369385

turnId: "turn-1",

370386

});

371387372-

const approvalRequest = mockCallGatewayTool.mock.calls[0]?.[2] as {

388+

const approvalRequest = gatewayToolArg(0, 2) as {

373389

title: string;

374390

description: string;

375391

};

@@ -427,7 +443,7 @@ describe("Codex app-server elicitation bridge", () => {

427443

turnId: "turn-1",

428444

});

429445430-

const approvalRequest = mockCallGatewayTool.mock.calls[0]?.[2] as {

446+

const approvalRequest = gatewayToolArg(0, 2) as {

431447

description: string;

432448

};

433449

expect(approvalRequest.description).toContain("- repo: openclaw/openclaw");

@@ -471,7 +487,7 @@ describe("Codex app-server elicitation bridge", () => {

471487

turnId: "turn-1",

472488

});

473489474-

const approvalRequest = mockCallGatewayTool.mock.calls[0]?.[2] as {

490+

const approvalRequest = gatewayToolArg(0, 2) as {

475491

description: string;

476492

};

477493

expect(approvalRequest.description).toContain("payload");

@@ -504,7 +520,7 @@ describe("Codex app-server elicitation bridge", () => {

504520

turnId: "turn-1",

505521

});

506522507-

const approvalRequest = mockCallGatewayTool.mock.calls[0]?.[2] as {

523+

const approvalRequest = gatewayToolArg(0, 2) as {

508524

description: string;

509525

};

510526

expect(approvalRequest.description).toContain("p0");

@@ -938,11 +954,11 @@ describe("Codex app-server elicitation bridge", () => {

938954

},

939955

_meta: null,

940956

});

941-

const approvalRequestCall = mockCallGatewayTool.mock.calls[0];

957+

const approvalRequestCall = gatewayToolCall();

942958

expect(approvalRequestCall?.[0]).toBe("plugin.approval.request");

943959

expect(approvalRequestCall?.[1]).toStrictEqual({ timeoutMs: 130_000 });

944960

expect(approvalRequestCall?.[3]).toStrictEqual({ expectFinal: false });

945-

const approvalRequest = approvalRequestCall?.[2] as {

961+

const approvalRequest = gatewayToolArg(0, 2) as {

946962

title: string;

947963

description: string;

948964

};

@@ -1029,7 +1045,7 @@ describe("Codex app-server elicitation bridge", () => {

10291045

content: null,

10301046

_meta: null,

10311047

});

1032-

const [warningMessage, warningDetails] = warn.mock.calls[0] ?? [];

1048+

const [warningMessage, warningDetails] = mockCall(warn) ?? [];

10331049

expect(warningMessage).toBe(

10341050

"codex MCP approval elicitation approved without a mappable response",

10351051

);