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

推荐订阅源

博客园_首页
量子位
D
DataBreaches.Net
博客园 - 司徒正美
J
Java Code Geeks
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
B
Blog
The Cloudflare Blog
D
Docker
I
InfoQ
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
腾讯CDC
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
S
SegmentFault 最新的问题
GbyAI
GbyAI
有赞技术团队
有赞技术团队

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 acpx runtime assertions · openclaw/openclaw...
shakkernerd · 2026-05-11 · via Recent Commits to openclaw:main

@@ -108,6 +108,16 @@ function makeLeaseStore() {

108108

};

109109

}

110110111+

function readFirstEnsureSessionInput(ensure: {

112+

mock: { calls: Array<Array<unknown>> };

113+

}): Parameters<AcpRuntime["ensureSession"]>[0] {

114+

const input = ensure.mock.calls[0]?.[0];

115+

if (typeof input !== "object" || input === null) {

116+

throw new Error("Expected ensureSession to be called with an input object");

117+

}

118+

return input as Parameters<AcpRuntime["ensureSession"]>[0];

119+

}

120+111121

describe("AcpxRuntime fresh reset wrapper", () => {

112122

beforeEach(() => {

113123

vi.restoreAllMocks();

@@ -174,11 +184,12 @@ describe("AcpxRuntime fresh reset wrapper", () => {

174184

model: "openai-codex/gpt-5.4",

175185

});

176186177-

expect(ensure).toHaveBeenCalledWith(

178-

expect.objectContaining({

179-

model: "gpt-5.4",

180-

}),

181-

);

187+

expect(readFirstEnsureSessionInput(ensure)).toEqual({

188+

sessionKey: "agent:codex:acp:test",

189+

agent: "codex",

190+

mode: "persistent",

191+

model: "gpt-5.4",

192+

});

182193

});

183194184195

it("leaves Codex ACP startup defaults alone when no model or thinking is provided", async () => {

@@ -204,13 +215,14 @@ describe("AcpxRuntime fresh reset wrapper", () => {

204215

mode: "persistent",

205216

});

206217207-

expect(ensure).toHaveBeenCalledWith(

208-

expect.objectContaining({

209-

agent: "codex",

210-

}),

211-

);

212-

expect(ensure.mock.calls[0]?.[0]).not.toHaveProperty("model");

213-

expect(ensure.mock.calls[0]?.[0]).not.toHaveProperty("thinking");

218+

const ensureInput = readFirstEnsureSessionInput(ensure);

219+

expect(ensureInput).toEqual({

220+

sessionKey: "agent:codex:acp:test",

221+

agent: "codex",

222+

mode: "persistent",

223+

});

224+

expect(ensureInput).not.toHaveProperty("model");

225+

expect(ensureInput).not.toHaveProperty("thinking");

214226

});

215227216228

it("does not normalize model startup for non-Codex ACP agents", async () => {

@@ -237,12 +249,12 @@ describe("AcpxRuntime fresh reset wrapper", () => {

237249

model: "openai-codex/gpt-5.5",

238250

});

239251240-

expect(ensure).toHaveBeenCalledWith(

241-

expect.objectContaining({

242-

agent: "main",

243-

model: "openai-codex/gpt-5.5",

244-

}),

245-

);

252+

expect(readFirstEnsureSessionInput(ensure)).toEqual({

253+

sessionKey: "agent:main:acp:test",

254+

agent: "main",

255+

mode: "persistent",

256+

model: "openai-codex/gpt-5.5",

257+

});

246258

});

247259248260

it("injects Codex ACP startup config into the scoped registry", () => {

@@ -283,11 +295,12 @@ describe("AcpxRuntime fresh reset wrapper", () => {

283295

model: "openai-codex/gpt-5.5",

284296

});

285297286-

expect(ensure).toHaveBeenCalledWith(

287-

expect.objectContaining({

288-

model: "gpt-5.5",

289-

}),

290-

);

298+

expect(readFirstEnsureSessionInput(ensure)).toEqual({

299+

sessionKey: "agent:codex:acp:test",

300+

agent: "codex",

301+

mode: "persistent",

302+

model: "gpt-5.5",

303+

});

291304

});

292305293306

it("maps explicit Codex ACP thinking to startup reasoning effort", async () => {

@@ -315,11 +328,13 @@ describe("AcpxRuntime fresh reset wrapper", () => {

315328

thinking: "x-high",

316329

});

317330318-

expect(ensure).toHaveBeenCalledWith(

319-

expect.objectContaining({

320-

model: "gpt-5.4/xhigh",

321-

}),

322-

);

331+

expect(readFirstEnsureSessionInput(ensure)).toEqual({

332+

sessionKey: "agent:codex:acp:test",

333+

agent: "codex",

334+

mode: "persistent",

335+

model: "gpt-5.4/xhigh",

336+

thinking: "x-high",

337+

});

323338

});

324339325340

it("normalizes Codex ACP model config controls to adapter ids", async () => {

@@ -929,9 +944,10 @@ describe("AcpxRuntime fresh reset wrapper", () => {

929944

{ pid: 941, signal: "SIGTERM" },

930945

{ pid: 940, signal: "SIGTERM" },

931946

]);

932-

expect(leaseStore.store.markState).not.toHaveBeenCalledWith("lease-old", expect.any(String));

933-

expect(leaseStore.store.markState).toHaveBeenCalledWith("lease-current", "closing");

934-

expect(leaseStore.store.markState).toHaveBeenLastCalledWith("lease-current", "closed");

947+

expect(leaseStore.store.markState.mock.calls).toEqual([

948+

["lease-current", "closing"],

949+

["lease-current", "closed"],

950+

]);

935951

});

936952937953

it("does not clean up a stale close pid reused by another wrapper root", async () => {