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

推荐订阅源

G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
雷峰网
雷峰网
博客园_首页
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
小众软件
小众软件
D
Docker
P
Proofpoint News Feed
B
Blog
Vercel News
Vercel News
B
Blog RSS Feed
U
Unit 42
月光博客
月光博客
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
I
InfoQ
Recent Announcements
Recent Announcements

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: clear config plugin validation broad matchers · ope...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -81,17 +81,40 @@ function expectRemovedPluginWarnings(

8181

expect(result.ok).toBe(true);

8282

if (result.ok) {

8383

const message = `plugin removed: ${removedLabel} (stale config entry ignored; remove it from plugins config)`;

84-

expect(result.warnings).toEqual(

85-

expect.arrayContaining([

86-

{ path: `plugins.entries.${removedId}`, message },

87-

{ path: "plugins.allow", message },

88-

{ path: "plugins.deny", message },

89-

{ path: "plugins.slots.memory", message },

90-

]),

91-

);

84+

expectPathMessage(result.warnings, `plugins.entries.${removedId}`, message);

85+

expectPathMessage(result.warnings, "plugins.allow", message);

86+

expectPathMessage(result.warnings, "plugins.deny", message);

87+

expectPathMessage(result.warnings, "plugins.slots.memory", message);

9288

}

9389

}

949091+

function expectPathMessage(

92+

entries: readonly { path: string; message: string }[] | undefined,

93+

pathValue: string,

94+

message: string,

95+

) {

96+

expect(entries?.some((entry) => entry.path === pathValue && entry.message === message)).toBe(

97+

true,

98+

);

99+

}

100+101+

function expectPathMessageIncludes(

102+

entries: readonly { path: string; message: string }[] | undefined,

103+

pathValue: string,

104+

fragment: string,

105+

) {

106+

expect(

107+

entries?.some((entry) => entry.path === pathValue && entry.message.includes(fragment)),

108+

).toBe(true);

109+

}

110+111+

function expectNoPath(

112+

entries: readonly { path: string; message: string }[] | undefined,

113+

pathValue: string,

114+

) {

115+

expect(entries?.some((entry) => entry.path === pathValue)).toBe(false);

116+

}

117+95118

describe("config plugin validation", () => {

96119

let fixtureRoot = "";

97120

let suiteHome = "";

@@ -234,12 +257,8 @@ describe("config plugin validation", () => {

234257

});

235258

expect(res.ok).toBe(false);

236259

if (!res.ok) {

237-

expect(res.issues).toEqual(

238-

expect.arrayContaining([

239-

{ path: "plugins.deny", message: "plugin not found: missing-deny" },

240-

{ path: "plugins.slots.memory", message: "plugin not found: missing-slot" },

241-

]),

242-

);

260+

expectPathMessage(res.issues, "plugins.deny", "plugin not found: missing-deny");

261+

expectPathMessage(res.issues, "plugins.slots.memory", "plugin not found: missing-slot");

243262

expect(res.warnings).toContainEqual({

244263

path: "plugins.allow",

245264

message:

@@ -276,12 +295,8 @@ describe("config plugin validation", () => {

276295

expect(res.ok).toBe(true);

277296

const message =

278297

"plugin not installed: brave — install the official external plugin with: openclaw plugins install @openclaw/brave-plugin";

279-

expect(res.warnings ?? []).toEqual(

280-

expect.arrayContaining([

281-

{ path: "plugins.entries.brave", message },

282-

{ path: "plugins.allow", message },

283-

]),

284-

);

298+

expectPathMessage(res.warnings, "plugins.entries.brave", message);

299+

expectPathMessage(res.warnings, "plugins.allow", message);

285300

expect(

286301

(res.warnings ?? []).some(

287302

(warning) =>

@@ -310,17 +325,15 @@ describe("config plugin validation", () => {

310325

if (!res.ok) {

311326

return;

312327

}

313-

expect(res.warnings).toEqual(

314-

expect.arrayContaining([

315-

expect.objectContaining({

316-

path: "plugins.entries.blocked-plugin",

317-

message: expect.stringContaining("plugin present but blocked: blocked-plugin"),

318-

}),

319-

expect.objectContaining({

320-

path: "plugins.allow",

321-

message: expect.stringContaining("plugin present but blocked: blocked-plugin"),

322-

}),

323-

]),

328+

expectPathMessageIncludes(

329+

res.warnings,

330+

"plugins.entries.blocked-plugin",

331+

"plugin present but blocked: blocked-plugin",

332+

);

333+

expectPathMessageIncludes(

334+

res.warnings,

335+

"plugins.allow",

336+

"plugin present but blocked: blocked-plugin",

324337

);

325338

expect(

326339

res.warnings.some(

@@ -367,17 +380,15 @@ describe("config plugin validation", () => {

367380

if (!res.ok) {

368381

return;

369382

}

370-

expect(res.warnings).toEqual(

371-

expect.arrayContaining([

372-

expect.objectContaining({

373-

path: "plugins.entries.blocked-plugin",

374-

message: expect.stringContaining("plugin present but blocked: blocked-plugin"),

375-

}),

376-

expect.objectContaining({

377-

path: "plugins.allow",

378-

message: expect.stringContaining("plugin present but blocked: blocked-plugin"),

379-

}),

380-

]),

383+

expectPathMessageIncludes(

384+

res.warnings,

385+

"plugins.entries.blocked-plugin",

386+

"plugin present but blocked: blocked-plugin",

387+

);

388+

expectPathMessageIncludes(

389+

res.warnings,

390+

"plugins.allow",

391+

"plugin present but blocked: blocked-plugin",

381392

);

382393

expect(

383394

res.warnings.some((warning) => warning.message.includes("plugin not found: blocked-plugin")),

@@ -421,28 +432,20 @@ describe("config plugin validation", () => {

421432

if (!res.ok) {

422433

return;

423434

}

424-

expect(res.warnings).toEqual(

425-

expect.arrayContaining([

426-

expect.objectContaining({

427-

path: "plugins.entries.actual-id",

428-

message: expect.stringContaining("plugin present but blocked: actual-id"),

429-

}),

430-

expect.objectContaining({

431-

path: "plugins.allow",

432-

message: expect.stringContaining("plugin present but blocked: actual-id"),

433-

}),

434-

expect.objectContaining({

435-

path: "plugins.entries.alias-dir",

436-

message:

437-

"plugin not found: alias-dir (stale config entry ignored; remove it from plugins config)",

438-

}),

439-

expect.objectContaining({

440-

path: "plugins.allow",

441-

message:

442-

"plugin not found: alias-dir (stale config entry ignored; remove it from plugins config)",

443-

}),

444-

]),

435+

expectPathMessageIncludes(

436+

res.warnings,

437+

"plugins.entries.actual-id",

438+

"plugin present but blocked: actual-id",

445439

);

440+

expectPathMessageIncludes(

441+

res.warnings,

442+

"plugins.allow",

443+

"plugin present but blocked: actual-id",

444+

);

445+

const aliasMessage =

446+

"plugin not found: alias-dir (stale config entry ignored; remove it from plugins config)";

447+

expectPathMessage(res.warnings, "plugins.entries.alias-dir", aliasMessage);

448+

expectPathMessage(res.warnings, "plugins.allow", aliasMessage);

446449

expect(

447450

res.warnings.some((warning) =>

448451

warning.message.includes("plugin present but blocked: alias-dir"),

@@ -502,7 +505,7 @@ describe("config plugin validation", () => {

502505

path: "channels.telegarm",

503506

message: "unknown channel id: telegarm",

504507

});

505-

expect(res.warnings).not.toContainEqual(expect.objectContaining({ path: "channels.telegarm" }));

508+

expectNoPath(res.warnings, "channels.telegarm");

506509

});

507510508511

it("warns when plugins.allow contains a channel id without a plugin manifest (#76872)", () => {

@@ -718,11 +721,10 @@ describe("config plugin validation", () => {

718721719722

expect(res.ok).toBe(false);

720723

if (!res.ok) {

721-

expect(res.issues).toContainEqual(

722-

expect.objectContaining({

723-

path: "plugins.entries.codex.config.codexPlugins.plugins.github.marketplaceName",

724-

message: expect.stringContaining("invalid config"),

725-

}),

724+

expectPathMessageIncludes(

725+

res.issues,

726+

"plugins.entries.codex.config.codexPlugins.plugins.github.marketplaceName",

727+

"invalid config",

726728

);

727729

expect(

728730

res.issues.some(

@@ -775,11 +777,9 @@ describe("config plugin validation", () => {

775777

const issue = res.issues.find(

776778

(entry) => entry.path === "plugins.entries.enum-plugin.config.fileFormat",

777779

);

778-

expect(issue).toMatchObject({

779-

message: expect.stringContaining('allowed: "markdown", "html"'),

780-

allowedValues: ["markdown", "html"],

781-

allowedValuesHiddenCount: 0,

782-

});

780+

expect(issue?.message).toContain('allowed: "markdown", "html"');

781+

expect(issue?.allowedValues).toEqual(["markdown", "html"]);

782+

expect(issue?.allowedValuesHiddenCount).toBe(0);

783783

}

784784

});

785785