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

推荐订阅源

S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
Jina AI
Jina AI
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
V
V2EX
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
B
Blog
博客园 - 叶小钗
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
A
About on SuperTechFans
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security 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 rescue message assertions · openclaw/opencl...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -229,7 +229,10 @@ describe("Crestodian rescue message", () => {

229229

runRescue("/crestodian plugins search calendar", cfg, commandContext(), deps),

230230

).resolves.toContain("search rows: calendar");

231231

expect(deps.runPluginsList).toHaveBeenCalledTimes(1);

232-

expect(deps.runPluginsSearch).toHaveBeenCalledWith("calendar", expect.any(Object));

232+

expect(deps.runPluginsSearch).toHaveBeenCalledTimes(1);

233+

const [searchQuery, searchRuntime] = deps.runPluginsSearch.mock.calls[0] ?? [];

234+

expect(searchQuery).toBe("calendar");

235+

expect(searchRuntime).toBeTypeOf("object");

233236

});

234237235238

it("queues and applies persistent writes through conversational approval", async () => {

@@ -244,16 +247,17 @@ describe("Crestodian rescue message", () => {

244247

"Default model: openai/gpt-5.2",

245248

);

246249247-

expect(mockConfig.currentConfig()).toMatchObject({

248-

agents: { defaults: { model: { primary: "openai/gpt-5.2" } } },

249-

});

250+

const currentConfig = mockConfig.currentConfig() as {

251+

agents?: { defaults?: { model?: { primary?: string } } };

252+

};

253+

expect(currentConfig.agents?.defaults?.model?.primary).toBe("openai/gpt-5.2");

250254

const auditPath = path.join(tempDir, "audit", "crestodian.jsonl");

251-

const audit = JSON.parse((await fs.readFile(auditPath, "utf8")).trim());

252-

expect(audit.details).toMatchObject({

253-

rescue: true,

254-

channel: "whatsapp",

255-

senderId: "user:owner",

256-

});

255+

const audit = JSON.parse((await fs.readFile(auditPath, "utf8")).trim()) as {

256+

details?: { rescue?: boolean; channel?: string; senderId?: string };

257+

};

258+

expect(audit.details?.rescue).toBe(true);

259+

expect(audit.details?.channel).toBe("whatsapp");

260+

expect(audit.details?.senderId).toBe("user:owner");

257261

});

258262259263

it("queues and applies gateway restart through conversational approval", async () => {

@@ -271,15 +275,14 @@ describe("Crestodian rescue message", () => {

271275272276

expect(deps.runGatewayRestart).toHaveBeenCalledTimes(1);

273277

const auditPath = path.join(tempDir, "audit", "crestodian.jsonl");

274-

const audit = JSON.parse((await fs.readFile(auditPath, "utf8")).trim());

275-

expect(audit).toMatchObject({

276-

operation: "gateway.restart",

277-

details: {

278-

rescue: true,

279-

channel: "whatsapp",

280-

senderId: "user:owner",

281-

},

282-

});

278+

const audit = JSON.parse((await fs.readFile(auditPath, "utf8")).trim()) as {

279+

operation?: string;

280+

details?: { rescue?: boolean; channel?: string; senderId?: string };

281+

};

282+

expect(audit.operation).toBe("gateway.restart");

283+

expect(audit.details?.rescue).toBe(true);

284+

expect(audit.details?.channel).toBe("whatsapp");

285+

expect(audit.details?.senderId).toBe("user:owner");

283286

});

284287285288

it("queues and applies agent creation through conversational approval", async () => {

@@ -298,26 +301,35 @@ describe("Crestodian rescue message", () => {

298301

);

299302300303

expect(deps.runAgentsAdd).toHaveBeenCalledTimes(1);

301-

expect(deps.runAgentsAdd).toHaveBeenCalledWith(

302-

{

303-

name: "work",

304-

workspace: "/tmp/work",

305-

nonInteractive: true,

306-

},

307-

expect.any(Object),

308-

{ hasFlags: true },

309-

);

310-

const auditPath = path.join(tempDir, "audit", "crestodian.jsonl");

311-

const audit = JSON.parse((await fs.readFile(auditPath, "utf8")).trim());

312-

expect(audit).toMatchObject({

313-

operation: "agents.create",

314-

details: {

315-

rescue: true,

316-

channel: "whatsapp",

317-

senderId: "user:owner",

318-

agentId: "work",

319-

workspace: "/tmp/work",

320-

},

304+

const [agentParams, agentRuntime, agentOptions] = deps.runAgentsAdd.mock

305+

.calls[0] as unknown as [

306+

{ name: string; workspace: string; nonInteractive: boolean },

307+

object,

308+

{ hasFlags: boolean },

309+

];

310+

expect(agentParams).toEqual({

311+

name: "work",

312+

workspace: "/tmp/work",

313+

nonInteractive: true,

321314

});

315+

expect(agentRuntime).toBeTypeOf("object");

316+

expect(agentOptions).toEqual({ hasFlags: true });

317+

const auditPath = path.join(tempDir, "audit", "crestodian.jsonl");

318+

const audit = JSON.parse((await fs.readFile(auditPath, "utf8")).trim()) as {

319+

operation?: string;

320+

details?: {

321+

rescue?: boolean;

322+

channel?: string;

323+

senderId?: string;

324+

agentId?: string;

325+

workspace?: string;

326+

};

327+

};

328+

expect(audit.operation).toBe("agents.create");

329+

expect(audit.details?.rescue).toBe(true);

330+

expect(audit.details?.channel).toBe("whatsapp");

331+

expect(audit.details?.senderId).toBe("user:owner");

332+

expect(audit.details?.agentId).toBe("work");

333+

expect(audit.details?.workspace).toBe("/tmp/work");

322334

});

323335

});