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

推荐订阅源

Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
美团技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
T
Tailwind CSS Blog
D
Docker
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google DeepMind News
Google DeepMind News
腾讯CDC
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
U
Unit 42
The Cloudflare Blog
S
SegmentFault 最新的问题
WordPress大学
WordPress大学
爱范儿
爱范儿
Recent Announcements
Recent Announcements
博客园 - 聂微东
博客园 - 叶小钗
H
Help Net Security
MyScale Blog
MyScale 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(perf): narrow runtime web tools state test · opencla...
steipete · 2026-05-06 · via Recent Commits to openclaw:main

@@ -1,52 +1,31 @@

1-

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

2-

import { asConfig, setupSecretsRuntimeSnapshotTestHooks } from "./runtime.test-support.ts";

3-4-

let activateSecretsRuntimeSnapshot: typeof import("./runtime.js").activateSecretsRuntimeSnapshot;

5-

let getActiveRuntimeWebToolsMetadata: typeof import("./runtime.js").getActiveRuntimeWebToolsMetadata;

6-

const { prepareSecretsRuntimeSnapshot } = setupSecretsRuntimeSnapshotTestHooks();

1+

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

2+

import {

3+

clearActiveRuntimeWebToolsMetadata,

4+

getActiveRuntimeWebToolsMetadata,

5+

setActiveRuntimeWebToolsMetadata,

6+

} from "./runtime-web-tools-state.js";

7788

describe("runtime web tools state", () => {

9-

beforeAll(async () => {

10-

({ activateSecretsRuntimeSnapshot, getActiveRuntimeWebToolsMetadata } =

11-

await import("./runtime.js"));

9+

afterEach(() => {

10+

clearActiveRuntimeWebToolsMetadata();

1211

});

131214-

it("exposes active runtime web tool metadata as a defensive clone", async () => {

15-

const snapshot = await prepareSecretsRuntimeSnapshot({

16-

config: asConfig({

17-

tools: {

18-

web: {

19-

search: {

20-

provider: "gemini",

21-

},

22-

},

23-

},

24-

plugins: {

25-

entries: {

26-

google: {

27-

config: {

28-

webSearch: {

29-

apiKey: {

30-

source: "env",

31-

provider: "default",

32-

id: "WEB_SEARCH_GEMINI_API_KEY",

33-

},

34-

},

35-

},

36-

},

37-

},

38-

},

39-

}),

40-

env: {

41-

WEB_SEARCH_GEMINI_API_KEY: "web-search-gemini-ref",

13+

it("exposes active runtime web tool metadata as a defensive clone", () => {

14+

setActiveRuntimeWebToolsMetadata({

15+

search: {

16+

providerConfigured: "gemini",

17+

providerSource: "configured",

18+

selectedProvider: "gemini",

19+

selectedProviderKeySource: "secretRef",

20+

diagnostics: [],

21+

},

22+

fetch: {

23+

providerSource: "none",

24+

diagnostics: [],

4225

},

43-

agentDirs: ["/tmp/openclaw-agent-main"],

44-

loadablePluginOrigins: new Map([["google", "bundled"]]),

45-

loadAuthStore: () => ({ version: 1, profiles: {} }),

26+

diagnostics: [],

4627

});

472848-

activateSecretsRuntimeSnapshot(snapshot);

49-5029

const first = getActiveRuntimeWebToolsMetadata();

5130

expect(first?.search.providerConfigured).toBe("gemini");

5231

expect(first?.search.selectedProvider).toBe("gemini");