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

推荐订阅源

爱范儿
爱范儿
量子位
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
J
Java Code Geeks
B
Blog
V
V2EX
博客园 - 三生石上(FineUI控件)
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
F
Fortinet All Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
A
About on SuperTechFans
D
DataBreaches.Net
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
H
Help Net Security
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
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
fix(doctor): discover load-path plugin contracts (#77477)...
jalehman · 2026-05-07 · via Recent Commits to openclaw:main

@@ -1,12 +1,18 @@

11

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

223-

const applyPluginDoctorCompatibilityMigrations = vi.hoisted(() => vi.fn());

3+

const { applyPluginDoctorCompatibilityMigrations, collectRelevantDoctorPluginIds } = vi.hoisted(

4+

() => ({

5+

applyPluginDoctorCompatibilityMigrations: vi.fn(),

6+

collectRelevantDoctorPluginIds: vi.fn(),

7+

}),

8+

);

49

const loadBundledChannelDoctorContractApi = vi.hoisted(() => vi.fn());

510

const getBootstrapChannelPlugin = vi.hoisted(() => vi.fn());

611712

vi.mock("../../../plugins/doctor-contract-registry.js", () => ({

813

applyPluginDoctorCompatibilityMigrations: (...args: unknown[]) =>

914

applyPluginDoctorCompatibilityMigrations(...args),

15+

collectRelevantDoctorPluginIds: (...args: unknown[]) => collectRelevantDoctorPluginIds(...args),

1016

}));

11171218

vi.mock("../../../channels/plugins/doctor-contract-api.js", () => ({

@@ -30,12 +36,14 @@ beforeAll(async () => {

30363137

beforeEach(() => {

3238

applyPluginDoctorCompatibilityMigrations.mockReset();

39+

collectRelevantDoctorPluginIds.mockReset();

3340

loadBundledChannelDoctorContractApi.mockReset();

3441

getBootstrapChannelPlugin.mockReset();

3542

});

36433744

describe("bundled channel legacy config migrations", () => {

3845

it("prefers bundled channel doctor contract normalizers before plugin registry fallback", () => {

46+

collectRelevantDoctorPluginIds.mockReturnValueOnce([]);

3947

loadBundledChannelDoctorContractApi.mockImplementation((channelId: string) =>

4048

channelId === "slack"

4149

? {

@@ -82,6 +90,7 @@ describe("bundled channel legacy config migrations", () => {

8290

});

83918492

it("normalizes legacy private-network aliases exposed through bundled contract surfaces", () => {

93+

collectRelevantDoctorPluginIds.mockReturnValueOnce(["mattermost"]);

8594

loadBundledChannelDoctorContractApi.mockReturnValue(undefined);

8695

getBootstrapChannelPlugin.mockReturnValue(undefined);

8796

applyPluginDoctorCompatibilityMigrations.mockReturnValueOnce({

@@ -121,6 +130,7 @@ describe("bundled channel legacy config migrations", () => {

121130

});

122131123132

expect(applyPluginDoctorCompatibilityMigrations).toHaveBeenCalledWith(expect.any(Object), {

133+

config: expect.any(Object),

124134

pluginIds: ["mattermost"],

125135

});

126136

@@ -147,4 +157,42 @@ describe("bundled channel legacy config migrations", () => {

147157

]),

148158

);

149159

});

160+161+

it("applies plugin doctor normalizers for configured non-channel plugin entries", () => {

162+

collectRelevantDoctorPluginIds.mockReturnValueOnce(["lossless-claw"]);

163+

applyPluginDoctorCompatibilityMigrations.mockReturnValueOnce({

164+

config: {

165+

plugins: {

166+

entries: {

167+

"lossless-claw": {

168+

llm: {

169+

allowModelOverride: true,

170+

allowedModels: ["openai-codex/gpt-5.4-mini"],

171+

},

172+

},

173+

},

174+

},

175+

},

176+

changes: ["Configured plugins.entries.lossless-claw.llm.allowedModels."],

177+

});

178+179+

const config = {

180+

plugins: {

181+

entries: {

182+

"lossless-claw": {

183+

config: {

184+

summaryModel: "openai-codex/gpt-5.4-mini",

185+

},

186+

},

187+

},

188+

},

189+

};

190+

const result = applyChannelDoctorCompatibilityMigrations(config);

191+192+

expect(applyPluginDoctorCompatibilityMigrations).toHaveBeenCalledWith(expect.any(Object), {

193+

config,

194+

pluginIds: ["lossless-claw"],

195+

});

196+

expect(result.changes).toEqual(["Configured plugins.entries.lossless-claw.llm.allowedModels."]);

197+

});

150198

});