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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
Recent Announcements
Recent Announcements
Vercel News
Vercel News
M
MIT News - Artificial intelligence
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
H
Help Net Security
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
G
Google Developers Blog
罗磊的独立博客
爱范儿
爱范儿
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
S
SegmentFault 最新的问题
WordPress大学
WordPress大学
月光博客
月光博客
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research

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 migration provider runtime assertions · ope...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -86,6 +86,18 @@ function createMigrationProvider(id: string) {

8686

};

8787

}

888889+

function requireMockCallArg(

90+

mockFn: { mock: { calls: unknown[][] } },

91+

label: string,

92+

index = 0,

93+

): Record<string, unknown> {

94+

const arg = mockFn.mock.calls[index]?.[0] as Record<string, unknown> | undefined;

95+

if (!arg) {

96+

throw new Error(`expected ${label} call #${index + 1}`);

97+

}

98+

return arg;

99+

}

100+89101

describe("migration provider runtime", () => {

90102

beforeEach(async () => {

91103

vi.clearAllMocks();

@@ -131,21 +143,25 @@ describe("migration provider runtime", () => {

131143

cfg: { plugins: { enabled: false } } as OpenClawConfig,

132144

});

133145134-

expect(mocks.ensureStandaloneRuntimePluginRegistryLoaded).toHaveBeenCalledWith({

135-

surface: "active",

136-

requiredPluginIds: ["migrate-hermes"],

137-

loadOptions: {

138-

activate: false,

139-

onlyPluginIds: ["migrate-hermes"],

140-

config: expect.objectContaining({

141-

plugins: expect.objectContaining({

142-

enabled: true,

143-

entries: {

144-

"migrate-hermes": { enabled: true },

145-

},

146-

}),

147-

}),

148-

},

146+

const standaloneParams = requireMockCallArg(

147+

mocks.ensureStandaloneRuntimePluginRegistryLoaded,

148+

"ensureStandaloneRuntimePluginRegistryLoaded",

149+

) as {

150+

surface?: unknown;

151+

requiredPluginIds?: unknown;

152+

loadOptions?: {

153+

activate?: unknown;

154+

onlyPluginIds?: unknown;

155+

config?: OpenClawConfig;

156+

};

157+

};

158+

expect(standaloneParams.surface).toBe("active");

159+

expect(standaloneParams.requiredPluginIds).toEqual(["migrate-hermes"]);

160+

expect(standaloneParams.loadOptions?.activate).toBe(false);

161+

expect(standaloneParams.loadOptions?.onlyPluginIds).toEqual(["migrate-hermes"]);

162+

expect(standaloneParams.loadOptions?.config?.plugins?.enabled).toBe(true);

163+

expect(standaloneParams.loadOptions?.config?.plugins?.entries).toEqual({

164+

"migrate-hermes": { enabled: true },

149165

});

150166

});

151167

@@ -211,16 +227,22 @@ describe("migration provider runtime", () => {

211227

env: process.env,

212228

preferPersisted: false,

213229

});

214-

expect(mocks.loadPluginManifestRegistry).toHaveBeenCalledWith({

215-

index: expect.objectContaining({

216-

plugins: expect.arrayContaining([

217-

expect.objectContaining({ pluginId: "external-migration" }),

218-

]),

219-

}),

220-

config: cfg,

221-

env: process.env,

222-

includeDisabled: true,

223-

});

230+

const manifestParams = requireMockCallArg(

231+

mocks.loadPluginManifestRegistry,

232+

"loadPluginManifestRegistry",

233+

) as {

234+

index?: MockPluginIndex;

235+

config?: OpenClawConfig;

236+

env?: NodeJS.ProcessEnv;

237+

includeDisabled?: unknown;

238+

};

239+

expect(manifestParams.index?.plugins.map((plugin) => plugin.pluginId)).toEqual([

240+

"external-migration",

241+

"disabled-external-migration",

242+

]);

243+

expect(manifestParams.config).toBe(cfg);

244+

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

245+

expect(manifestParams.includeDisabled).toBe(true);

224246

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

225247

expect(mocks.resolveRuntimePluginRegistry).toHaveBeenCalledWith({

226248

onlyPluginIds: ["external-migration"],

@@ -269,15 +291,27 @@ describe("migration provider runtime", () => {

269291

preferPersisted: false,

270292

workspaceDir: undefined,

271293

});

272-

expect(mocks.loadPluginManifestRegistry).toHaveBeenCalledWith({

273-

index: expect.objectContaining({

274-

plugins: [expect.objectContaining({ pluginId: "migrate-hermes" })],

275-

}),

276-

config: {},

277-

env: process.env,

278-

includeDisabled: true,

279-

workspaceDir: undefined,

280-

});

294+

const manifestParams = requireMockCallArg(

295+

mocks.loadPluginManifestRegistry,

296+

"loadPluginManifestRegistry",

297+

) as {

298+

index?: MockPluginIndex;

299+

config?: OpenClawConfig;

300+

env?: NodeJS.ProcessEnv;

301+

includeDisabled?: unknown;

302+

workspaceDir?: unknown;

303+

};

304+

expect(manifestParams.index?.plugins).toEqual([

305+

{

306+

pluginId: "migrate-hermes",

307+

origin: "bundled",

308+

enabled: true,

309+

},

310+

]);

311+

expect(manifestParams.config).toEqual({});

312+

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

313+

expect(manifestParams.includeDisabled).toBe(true);

314+

expect(manifestParams.workspaceDir).toBeUndefined();

281315

expect(mocks.resolveRuntimePluginRegistry).toHaveBeenCalledWith({

282316

onlyPluginIds: ["migrate-hermes"],

283317

});