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

推荐订阅源

博客园 - 【当耐特】
小众软件
小众软件
S
SegmentFault 最新的问题
GbyAI
GbyAI
量子位
爱范儿
爱范儿
L
LangChain Blog
Vercel News
Vercel News
A
About on SuperTechFans
腾讯CDC
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
月光博客
月光博客
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
V
Visual Studio Blog
美团技术团队
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium

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: quarantine invalid plugin configs · openclaw/opencla...
steipete · 2026-04-27 · via Recent Commits to openclaw:main

@@ -8,6 +8,12 @@ vi.mock("../config/config.js", () => ({

88

readConfigFileSnapshot: vi.fn(),

99

recoverConfigFromLastKnownGood: vi.fn(),

1010

recoverConfigFromJsonRootSuffix: vi.fn(),

11+

isPluginLocalInvalidConfigSnapshot: vi.fn((snapshot: ConfigFileSnapshot) => {

12+

if (snapshot.valid || snapshot.legacyIssues.length > 0 || snapshot.issues.length === 0) {

13+

return false;

14+

}

15+

return snapshot.issues.every((issue) => issue.path.startsWith("plugins.entries."));

16+

}),

1117

shouldAttemptLastKnownGoodRecovery: vi.fn((snapshot: ConfigFileSnapshot) => {

1218

if (snapshot.valid) {

1319

return false;

@@ -125,7 +131,7 @@ describe("gateway startup config recovery", () => {

125131

expect(recoveryNotice.enqueueConfigRecoveryNotice).not.toHaveBeenCalled();

126132

});

127133128-

it("does not restore last-known-good for plugin-local startup invalidity", async () => {

134+

it("continues startup in degraded mode for plugin-local startup invalidity", async () => {

129135

const invalidSnapshot = buildTestConfigSnapshot({

130136

path: configPath,

131137

exists: true,

@@ -171,16 +177,82 @@ describe("gateway startup config recovery", () => {

171177

minimalTestGateway: true,

172178

log,

173179

}),

174-

).rejects.toThrow(`Invalid config at ${configPath}.`);

180+

).resolves.toEqual({

181+

snapshot: expect.objectContaining({

182+

valid: true,

183+

issues: [],

184+

warnings: invalidSnapshot.issues,

185+

}),

186+

wroteConfig: false,

187+

degradedPluginConfig: true,

188+

});

175189176190

expect(configIo.recoverConfigFromLastKnownGood).not.toHaveBeenCalled();

177-

expect(configIo.recoverConfigFromJsonRootSuffix).toHaveBeenCalledWith(invalidSnapshot);

191+

expect(configIo.recoverConfigFromJsonRootSuffix).not.toHaveBeenCalled();

178192

expect(log.warn).toHaveBeenCalledWith(

179-

`gateway: last-known-good recovery skipped for plugin-local config invalidity: ${configPath}`,

193+

`gateway: skipped plugin config validation issue at plugins.entries.feishu: plugin feishu: plugin requires OpenClaw >=2026.4.23, but this host is 2026.4.22; skipping load. Run "openclaw doctor --fix" to quarantine the plugin config.`,

180194

);

181195

expect(recoveryNotice.enqueueConfigRecoveryNotice).not.toHaveBeenCalled();

182196

});

183197198+

it("keeps mixed plugin and core startup invalidity fatal", async () => {

199+

const invalidSnapshot = buildTestConfigSnapshot({

200+

path: configPath,

201+

exists: true,

202+

raw: `${JSON.stringify({

203+

gateway: { mode: "invalid" },

204+

plugins: {

205+

entries: {

206+

feishu: { enabled: true },

207+

},

208+

},

209+

})}\n`,

210+

parsed: {

211+

gateway: { mode: "invalid" },

212+

plugins: {

213+

entries: {

214+

feishu: { enabled: true },

215+

},

216+

},

217+

},

218+

valid: false,

219+

config: {

220+

gateway: { mode: "invalid" },

221+

plugins: {

222+

entries: {

223+

feishu: { enabled: true },

224+

},

225+

},

226+

} as unknown as OpenClawConfig,

227+

issues: [

228+

{

229+

path: "gateway.mode",

230+

message: "Expected 'local' or 'remote'",

231+

},

232+

{

233+

path: "plugins.entries.feishu.config.token",

234+

message: "invalid config: must be string",

235+

},

236+

],

237+

legacyIssues: [],

238+

});

239+

vi.mocked(configIo.readConfigFileSnapshot).mockResolvedValueOnce(invalidSnapshot);

240+

vi.mocked(configIo.recoverConfigFromLastKnownGood).mockResolvedValueOnce(false);

241+

vi.mocked(configIo.recoverConfigFromJsonRootSuffix).mockResolvedValueOnce(false);

242+243+

await expect(

244+

loadGatewayStartupConfigSnapshot({

245+

minimalTestGateway: true,

246+

log: { info: vi.fn(), warn: vi.fn() },

247+

}),

248+

).rejects.toThrow(`Invalid config at ${configPath}.`);

249+250+

expect(configIo.recoverConfigFromLastKnownGood).toHaveBeenCalledWith({

251+

snapshot: invalidSnapshot,

252+

reason: "startup-invalid-config",

253+

});

254+

});

255+184256

it("skips providers with stale model api enum values during startup", async () => {

185257

const config = {

186258

gateway: { mode: "local" },