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

推荐订阅源

Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - 司徒正美
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
罗磊的独立博客
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog
J
Java Code Geeks
L
LangChain Blog
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers 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 UI gateway assertions · openclaw/openclaw@e...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -121,7 +121,9 @@ function expectLatestRequestTiming(

121121

expected: Partial<RequestTimingPayload>,

122122

) {

123123

const timing = onRequestTiming.mock.calls.at(-1)?.[0] as RequestTimingPayload | undefined;

124-

expect(timing).toMatchObject(expected);

124+

for (const [key, value] of Object.entries(expected)) {

125+

expect(timing?.[key as keyof RequestTimingPayload]).toBe(value);

126+

}

125127

expect(timing?.startedAtMs).toBeTypeOf("number");

126128

expect(timing?.endedAtMs).toBeTypeOf("number");

127129

expect(timing?.durationMs).toBeTypeOf("number");

@@ -304,18 +306,23 @@ describe("GatewayBrowserClient", () => {

304306

});

305307306308

expect(() => client.start()).not.toThrow();

307-

expect(onClose).toHaveBeenCalledWith({

308-

code: 1006,

309-

reason: "security error",

310-

error: expect.objectContaining({

311-

code: "BROWSER_WEBSOCKET_SECURITY_ERROR",

312-

message: expect.stringContaining("Use wss://"),

313-

details: expect.objectContaining({

314-

code: "BROWSER_WEBSOCKET_SECURITY_ERROR",

315-

browserErrorName: "SecurityError",

316-

}),

317-

}),

318-

});

309+

const close = onClose.mock.calls[0]?.[0] as

310+

| {

311+

code?: number;

312+

reason?: string;

313+

error?: {

314+

code?: string;

315+

message?: string;

316+

details?: { code?: string; browserErrorName?: string };

317+

};

318+

}

319+

| undefined;

320+

expect(close?.code).toBe(1006);

321+

expect(close?.reason).toBe("security error");

322+

expect(close?.error?.code).toBe("BROWSER_WEBSOCKET_SECURITY_ERROR");

323+

expect(close?.error?.message).toContain("Use wss://");

324+

expect(close?.error?.details?.code).toBe("BROWSER_WEBSOCKET_SECURITY_ERROR");

325+

expect(close?.error?.details?.browserErrorName).toBe("SecurityError");

319326

expect(wsInstances).toHaveLength(0);

320327321328

await vi.advanceTimersByTimeAsync(30_000);

@@ -343,19 +350,24 @@ describe("GatewayBrowserClient", () => {

343350

});

344351345352

expect(() => client.start()).not.toThrow();

346-

expect(onClose).toHaveBeenCalledWith({

347-

code: 1006,

348-

reason: "websocket error",

349-

error: expect.objectContaining({

350-

code: "BROWSER_WEBSOCKET_CONSTRUCTOR_ERROR",

351-

message: expect.stringContaining("Could not create the Gateway WebSocket"),

352-

details: expect.objectContaining({

353-

code: "BROWSER_WEBSOCKET_CONSTRUCTOR_ERROR",

354-

browserErrorName: "TypeError",

355-

browserMessage: "constructor failed",

356-

}),

357-

}),

358-

});

353+

const close = onClose.mock.calls[0]?.[0] as

354+

| {

355+

code?: number;

356+

reason?: string;

357+

error?: {

358+

code?: string;

359+

message?: string;

360+

details?: { code?: string; browserErrorName?: string; browserMessage?: string };

361+

};

362+

}

363+

| undefined;

364+

expect(close?.code).toBe(1006);

365+

expect(close?.reason).toBe("websocket error");

366+

expect(close?.error?.code).toBe("BROWSER_WEBSOCKET_CONSTRUCTOR_ERROR");

367+

expect(close?.error?.message).toContain("Could not create the Gateway WebSocket");

368+

expect(close?.error?.details?.code).toBe("BROWSER_WEBSOCKET_CONSTRUCTOR_ERROR");

369+

expect(close?.error?.details?.browserErrorName).toBe("TypeError");

370+

expect(close?.error?.details?.browserMessage).toBe("constructor failed");

359371

expect(wsInstances).toHaveLength(0);

360372361373

await vi.advanceTimersByTimeAsync(30_000);

@@ -436,12 +448,14 @@ describe("GatewayBrowserClient", () => {

436448

error: { code: "CONFIG_ERROR", message: "config failed" },

437449

});

438450439-

await expect(request).rejects.toMatchObject({ gatewayCode: "CONFIG_ERROR" });

440-

expect(onRequestTiming).toHaveBeenCalledWith(

441-

expect.not.objectContaining({

442-

params: expect.anything(),

443-

}),

444-

);

451+

try {

452+

await request;

453+

throw new Error("expected config.get request to reject");

454+

} catch (error) {

455+

expect((error as { gatewayCode?: string }).gatewayCode).toBe("CONFIG_ERROR");

456+

}

457+

expect(onRequestTiming).toHaveBeenCalledTimes(1);

458+

expect(onRequestTiming.mock.calls[0]?.[0]).not.toHaveProperty("params");

445459

expectLatestRequestTiming(onRequestTiming, {

446460

id: frame.id,

447461

method: "config.get",