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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
U
Unit 42
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG
IT之家
IT之家
MyScale Blog
MyScale Blog
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
I
InfoQ
博客园 - 司徒正美

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
[codex] refresh plugin regression fixtures · openclaw/ope...
JayZeeDesign · 2026-05-11 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1,6 +1,7 @@

11

import { afterEach, describe, expect, it } from "vitest";

22

import { type WebSocket, WebSocketServer } from "ws";

33

import { rawDataToString } from "../infra/ws.js";

4+

import "../test-support/browser-security.mock.js";

45

import {

56

type AriaSnapshotNode,

67

captureScreenshot,

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,6 @@

11

import { describe, expect, it, vi } from "vitest";

22

import type { BrowserRouteContext, ProfileContext } from "../server-context.js";

3+

import "../../test-support/browser-security.mock.js";

34

import {

45

readBody,

56

resolveSafeRouteTabUrl,

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,7 @@

11

import { afterEach, describe, expect, it, vi } from "vitest";

22

import "../../../test-support.js";

33

import "../server-context.chrome-test-harness.js";

4+

import "../../test-support/browser-security.mock.js";

45

import * as chromeModule from "../chrome.js";

56

import { createBrowserRouteContext } from "../server-context.js";

67

import { makeBrowserServerState } from "../server-context.test-harness.js";

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,6 @@

11

import { afterEach, describe, expect, it, vi } from "vitest";

22

import { withBrowserFetchPreconnect } from "../../test-fetch.js";

3+

import "../test-support/browser-security.mock.js";

34
45

vi.hoisted(() => {

56

vi.resetModules();

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,7 @@

11

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

22

import { getFreePort } from "./test-port.js";

33

import { getBrowserTestFetch } from "./test-support/fetch.js";

4+

import "../test-support/browser-security.mock.js";

45
56

let testPort = 0;

67

let prevGatewayPort: string | undefined;

Original file line numberDiff line numberDiff line change

@@ -1,13 +1,24 @@

11

import { vi } from "vitest";

22
3+

const lookupFn = vi.hoisted(() => async (_hostname: string, options?: { all?: boolean }) => {

4+

const result = { address: "93.184.216.34", family: 4 };

5+

return options?.all === true ? [result] : result;

6+

});

7+
8+

vi.mock("../infra/net/ssrf.js", async () => {

9+

const actual =

10+

await vi.importActual<typeof import("../infra/net/ssrf.js")>("../infra/net/ssrf.js");

11+

return {

12+

...actual,

13+

resolvePinnedHostnameWithPolicy: (hostname: string, params: object = {}) =>

14+

actual.resolvePinnedHostnameWithPolicy(hostname, { ...params, lookupFn: lookupFn as never }),

15+

};

16+

});

17+
318

vi.mock("../sdk-security-runtime.js", async () => {

419

const actual = await vi.importActual<typeof import("../sdk-security-runtime.js")>(

520

"../sdk-security-runtime.js",

621

);

7-

const lookupFn = async (_hostname: string, options?: { all?: boolean }) => {

8-

const result = { address: "93.184.216.34", family: 4 };

9-

return options?.all === true ? [result] : result;

10-

};

1122

return {

1223

...actual,

1324

resolvePinnedHostnameWithPolicy: (hostname: string, params: object = {}) =>

Original file line numberDiff line numberDiff line change

@@ -1728,16 +1728,15 @@ describe("processDiscordMessage draft streaming", () => {

17281728

mode: "progress",

17291729

progress: {

17301730

label: "Clawing...",

1731-

maxLines: 3,

1731+

maxLines: 4,

17321732

},

17331733

},

17341734

},

17351735

});

17361736
17371737

await runProcessDiscordMessage(ctx);

17381738
1739-

expect(draftStream.update).toHaveBeenNthCalledWith(1, "Clawing...\n🧩 First\n🧩 Second");

1740-

expect(draftStream.update).toHaveBeenNthCalledWith(2, "🧩 First\n🧩 Second\n🧩 Third");

1739+

expect(draftStream.update).toHaveBeenCalledWith("Clawing...\n🧩 First\n🧩 Second\n🧩 Third");

17411740

});

17421741
17431742

it("skips empty apply_patch starts and renders the patch summary", async () => {

Original file line numberDiff line numberDiff line change

@@ -1,10 +1,22 @@

1-

import { describe, expect, it, vi } from "vitest";

1+

import { mockPinnedHostnameResolution } from "openclaw/plugin-sdk/test-env";

2+

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

23

import {

34

elevenLabsMediaUnderstandingProvider,

45

transcribeElevenLabsAudio,

56

} from "./media-understanding-provider.js";

67
78

describe("elevenLabsMediaUnderstandingProvider", () => {

9+

let ssrfMock: { mockRestore: () => void } | undefined;

10+
11+

beforeEach(() => {

12+

ssrfMock = mockPinnedHostnameResolution();

13+

});

14+
15+

afterEach(() => {

16+

ssrfMock?.mockRestore();

17+

ssrfMock = undefined;

18+

});

19+
820

it("has expected provider metadata", () => {

921

expect(elevenLabsMediaUnderstandingProvider.id).toBe("elevenlabs");

1022

expect(elevenLabsMediaUnderstandingProvider.capabilities).toEqual(["audio"]);

Original file line numberDiff line numberDiff line change

@@ -1,9 +1,12 @@

11

import * as providerAuthRuntime from "openclaw/plugin-sdk/provider-auth-runtime";

22

import * as providerHttp from "openclaw/plugin-sdk/provider-http";

3-

import { afterEach, describe, expect, it, vi } from "vitest";

3+

import { mockPinnedHostnameResolution } from "openclaw/plugin-sdk/test-env";

4+

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

45

import { buildGoogleImageGenerationProvider } from "./image-generation-provider.js";

56

import { __testing as geminiWebSearchTesting } from "./src/gemini-web-search-provider.js";

67
8+

let ssrfMock: { mockRestore: () => void } | undefined;

9+
710

function mockGoogleApiKeyAuth() {

811

vi.spyOn(providerAuthRuntime, "resolveApiKeyForProvider").mockResolvedValue({

912

apiKey: "google-test-key",

@@ -75,7 +78,13 @@ function postJsonRequestOptions(spy: unknown): {

7578

}

7679
7780

describe("Google image-generation provider", () => {

81+

beforeEach(() => {

82+

ssrfMock = mockPinnedHostnameResolution();

83+

});

84+
7885

afterEach(() => {

86+

ssrfMock?.mockRestore();

87+

ssrfMock = undefined;

7988

vi.restoreAllMocks();

8089

vi.unstubAllGlobals();

8190

});

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,7 @@

11

import { writeFile } from "node:fs/promises";

22

import path from "node:path";

3-

import { afterAll, afterEach, describe, expect, it, vi } from "vitest";

3+

import { mockPinnedHostnameResolution } from "openclaw/plugin-sdk/test-env";

4+

import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest";

45
56

const { createGoogleGenAIMock, downloadMock, generateVideosMock, getVideosOperationMock } =

67

vi.hoisted(() => {

@@ -54,8 +55,16 @@ function firstGoogleClientHttpOptions(): Record<string, unknown> {

5455

return recordField(firstObjectArg(createGoogleGenAIMock).httpOptions, "httpOptions");

5556

}

5657
58+

let ssrfMock: { mockRestore: () => void } | undefined;

59+
5760

describe("google video generation provider", () => {

61+

beforeEach(() => {

62+

ssrfMock = mockPinnedHostnameResolution();

63+

});

64+
5865

afterEach(() => {

66+

ssrfMock?.mockRestore();

67+

ssrfMock = undefined;

5968

vi.restoreAllMocks();

6069

vi.unstubAllGlobals();

6170

downloadMock.mockReset();