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

推荐订阅源

B
Blog RSS Feed
量子位
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
博客园 - 聂微东
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
U
Unit 42
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain 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 capability provider assertions · openclaw/o...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -154,6 +154,44 @@ function expectInitialRuntimeRegistryLookup() {

154154

expect(mocks.resolveRuntimePluginRegistry).toHaveBeenNthCalledWith(1);

155155

}

156156157+

function requireManifestRegistryLoadParams(index = 0): Record<string, unknown> {

158+

const call = mocks.loadPluginManifestRegistry.mock.calls[index] as

159+

| [Record<string, unknown>]

160+

| undefined;

161+

if (!call) {

162+

throw new Error(`loadPluginManifestRegistry call ${index} missing`);

163+

}

164+

return call[0];

165+

}

166+167+

function expectManifestRegistryLoad(index: number, config: OpenClawConfig | Record<string, never>) {

168+

const params = requireManifestRegistryLoadParams(index);

169+

expect(params.config).toEqual(config);

170+

expect(params.env).toBe(process.env);

171+

}

172+173+

function requireRuntimeRegistryLookup(params: {

174+

activate?: boolean;

175+

onlyPluginIds?: string[];

176+

}): Record<string, unknown> {

177+

const lookup = mocks.resolveRuntimePluginRegistry.mock.calls

178+

.map(([options]) => options)

179+

.find(

180+

(options): options is Record<string, unknown> =>

181+

Boolean(options) &&

182+

typeof options === "object" &&

183+

(params.activate === undefined ||

184+

(options as { activate?: unknown }).activate === params.activate) &&

185+

(params.onlyPluginIds === undefined ||

186+

JSON.stringify((options as { onlyPluginIds?: unknown }).onlyPluginIds) ===

187+

JSON.stringify(params.onlyPluginIds)),

188+

);

189+

if (!lookup) {

190+

throw new Error("runtime registry lookup missing");

191+

}

192+

return lookup;

193+

}

194+157195

function collectActiveRegistryLookups() {

158196

return mocks.resolveRuntimePluginRegistry.mock.calls

159197

.map(([options]) => options)

@@ -177,12 +215,7 @@ function expectBundledCompatLoadPath(params: {

177215

};

178216

};

179217

}) {

180-

expect(mocks.loadPluginManifestRegistry).toHaveBeenCalledWith(

181-

expect.objectContaining({

182-

config: params.cfg,

183-

env: process.env,

184-

}),

185-

);

218+

expectManifestRegistryLoad(0, params.cfg);

186219

expect(mocks.withBundledPluginEnablementCompat).toHaveBeenCalledWith({

187220

config: params.allowlistCompat,

188221

pluginIds: ["openai"],

@@ -580,12 +613,12 @@ describe("resolvePluginCapabilityProviders", () => {

580613

expect(mocks.resolveRuntimePluginRegistry).toHaveBeenCalledWith({

581614

onlyPluginIds: ["fish-audio"],

582615

});

583-

expect(mocks.resolveRuntimePluginRegistry).toHaveBeenCalledWith(

584-

expect.objectContaining({

585-

activate: false,

586-

onlyPluginIds: ["fish-audio"],

587-

}),

588-

);

616+

const inactiveLookup = requireRuntimeRegistryLookup({

617+

activate: false,

618+

onlyPluginIds: ["fish-audio"],

619+

});

620+

expect(inactiveLookup.activate).toBe(false);

621+

expect(inactiveLookup.onlyPluginIds).toEqual(["fish-audio"]);

589622

expect(mocks.loadBundledCapabilityRuntimeRegistry).not.toHaveBeenCalled();

590623

});

591624

@@ -758,9 +791,14 @@ describe("resolvePluginCapabilityProviders", () => {

758791759792

expectResolvedCapabilityProviderIds(providers, ["acme"]);

760793

expectInitialRuntimeRegistryLookup();

761-

expect(mocks.resolveRuntimePluginRegistry).not.toHaveBeenCalledWith({

762-

config: expect.anything(),

763-

});

794+

expect(

795+

mocks.resolveRuntimePluginRegistry.mock.calls.some(

796+

([options]) =>

797+

Boolean(options) &&

798+

typeof options === "object" &&

799+

Object.hasOwn(options as Record<string, unknown>, "config"),

800+

),

801+

).toBe(false);

764802

});

765803766804

it("merges active and allowlisted bundled capability providers when cfg is passed", () => {

@@ -1260,12 +1298,7 @@ describe("resolvePluginCapabilityProviders", () => {

12601298

const providers = resolvePluginCapabilityProviders({ key: "mediaUnderstandingProviders" });

1261129912621300

expectResolvedCapabilityProviderIds(providers, ["google"]);

1263-

expect(mocks.loadPluginManifestRegistry).toHaveBeenCalledWith(

1264-

expect.objectContaining({

1265-

config: {},

1266-

env: process.env,

1267-

}),

1268-

);

1301+

expectManifestRegistryLoad(0, {});

12691302

expectActiveRegistryLookup(["google"]);

12701303

});

12711304

@@ -1378,12 +1411,7 @@ describe("resolvePluginCapabilityProviders", () => {

13781411

});

1379141213801413

expectResolvedCapabilityProviderIds(providers, ["microsoft"]);

1381-

expect(mocks.loadPluginManifestRegistry).toHaveBeenCalledWith(

1382-

expect.objectContaining({

1383-

config: cfg,

1384-

env: process.env,

1385-

}),

1386-

);

1414+

expectManifestRegistryLoad(0, cfg);

13871415

expect(mocks.withBundledPluginAllowlistCompat).toHaveBeenCalledWith({

13881416

config: cfg,

13891417

pluginIds: ["microsoft"],

@@ -1407,12 +1435,7 @@ describe("resolvePluginCapabilityProviders", () => {

14071435

});

1408143614091437

expectNoResolvedCapabilityProviders(providers as Array<{ id: string }>);

1410-

expect(mocks.loadPluginManifestRegistry).toHaveBeenCalledWith(

1411-

expect.objectContaining({

1412-

config: {},

1413-

env: process.env,

1414-

}),

1415-

);

1438+

expectManifestRegistryLoad(0, {});

14161439

expectInitialRuntimeRegistryLookup();

14171440

expectActiveRegistryLookup([]);

14181441

});