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

推荐订阅源

博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
罗磊的独立博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
宝玉的分享
宝玉的分享
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
N
Netflix TechBlog - Medium
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
美团技术团队
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | 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
feat: warn on implicit startup plugin compatibility · ope...
shakkernerd · 2026-04-28 · via Recent Commits to openclaw:main

@@ -7,18 +7,22 @@ import {

77

createTypedHook,

88

HOOK_ONLY_MESSAGE,

99

LEGACY_BEFORE_AGENT_START_MESSAGE,

10+

LEGACY_IMPLICIT_STARTUP_SIDECAR_MESSAGE,

1011

} from "./status.test-helpers.js";

11121213

const loadConfigMock = vi.fn();

1314

const loadOpenClawPluginsMock = vi.fn();

1415

const loadPluginMetadataRegistrySnapshotMock = vi.fn();

16+

const loadPluginRegistrySnapshotWithMetadataMock = vi.fn();

17+

const loadPluginManifestRegistryForInstalledIndexMock = vi.fn();

1518

const applyPluginAutoEnableMock = vi.fn();

1619

const resolveBundledProviderCompatPluginIdsMock = vi.fn();

1720

const withBundledPluginAllowlistCompatMock = vi.fn();

1821

const withBundledPluginEnablementCompatMock = vi.fn();

1922

const listImportedBundledPluginFacadeIdsMock = vi.fn();

2023

const listImportedRuntimePluginIdsMock = vi.fn();

2124

let buildPluginSnapshotReport: typeof import("./status.js").buildPluginSnapshotReport;

25+

let buildPluginRegistrySnapshotReport: typeof import("./status.js").buildPluginRegistrySnapshotReport;

2226

let buildPluginDiagnosticsReport: typeof import("./status.js").buildPluginDiagnosticsReport;

2327

let buildPluginInspectReport: typeof import("./status.js").buildPluginInspectReport;

2428

let buildAllPluginInspectReports: typeof import("./status.js").buildAllPluginInspectReports;

@@ -45,6 +49,16 @@ vi.mock("./runtime/metadata-registry-loader.js", () => ({

4549

loadPluginMetadataRegistrySnapshotMock(...args),

4650

}));

475152+

vi.mock("./plugin-registry.js", () => ({

53+

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

54+

loadPluginRegistrySnapshotWithMetadataMock(...args),

55+

}));

56+57+

vi.mock("./manifest-registry-installed.js", () => ({

58+

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

59+

loadPluginManifestRegistryForInstalledIndexMock(...args),

60+

}));

61+4862

vi.mock("./providers.js", () => ({

4963

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

5064

resolveBundledProviderCompatPluginIdsMock(...args),

@@ -95,6 +109,23 @@ function setSinglePluginLoadResult(

95109

});

96110

}

97111112+

function createInstalledPluginIndexSnapshot(

113+

plugins: Array<Record<string, unknown>>,

114+

): Record<string, unknown> {

115+

return {

116+

version: 1,

117+

warning: "test",

118+

hostContractVersion: "test",

119+

compatRegistryVersion: "test",

120+

migrationVersion: 1,

121+

policyHash: "test",

122+

generatedAtMs: 0,

123+

installRecords: {},

124+

plugins,

125+

diagnostics: [],

126+

};

127+

}

128+98129

function expectInspectReport(

99130

pluginId: string,

100131

): NonNullable<ReturnType<typeof buildPluginInspectReport>> {

@@ -321,6 +352,7 @@ describe("plugin status reports", () => {

321352

buildPluginDiagnosticsReport,

322353

buildPluginCompatibilityWarnings,

323354

buildPluginInspectReport,

355+

buildPluginRegistrySnapshotReport,

324356

buildPluginSnapshotReport,

325357

formatPluginCompatibilityNotice,

326358

summarizePluginCompatibility,

@@ -331,13 +363,24 @@ describe("plugin status reports", () => {

331363

loadConfigMock.mockReset();

332364

loadOpenClawPluginsMock.mockReset();

333365

loadPluginMetadataRegistrySnapshotMock.mockReset();

366+

loadPluginRegistrySnapshotWithMetadataMock.mockReset();

367+

loadPluginManifestRegistryForInstalledIndexMock.mockReset();

334368

applyPluginAutoEnableMock.mockReset();

335369

resolveBundledProviderCompatPluginIdsMock.mockReset();

336370

withBundledPluginAllowlistCompatMock.mockReset();

337371

withBundledPluginEnablementCompatMock.mockReset();

338372

listImportedBundledPluginFacadeIdsMock.mockReset();

339373

listImportedRuntimePluginIdsMock.mockReset();

340374

loadConfigMock.mockReturnValue({});

375+

loadPluginRegistrySnapshotWithMetadataMock.mockReturnValue({

376+

snapshot: createInstalledPluginIndexSnapshot([]),

377+

source: "derived",

378+

diagnostics: [],

379+

});

380+

loadPluginManifestRegistryForInstalledIndexMock.mockReturnValue({

381+

plugins: [],

382+

diagnostics: [],

383+

});

341384

applyPluginAutoEnableMock.mockImplementation((params: { config: unknown }) => ({

342385

config: params.config,

343386

changes: [],

@@ -393,6 +436,41 @@ describe("plugin status reports", () => {

393436

});

394437

});

395438439+

it("carries installed-index compatibility metadata into registry snapshot reports", () => {

440+

loadPluginRegistrySnapshotWithMetadataMock.mockReturnValue({

441+

snapshot: createInstalledPluginIndexSnapshot([

442+

{

443+

pluginId: "legacy-sidecar",

444+

manifestPath: "/tmp/legacy-sidecar/openclaw.plugin.json",

445+

manifestHash: "manifest-hash",

446+

rootDir: "/tmp/legacy-sidecar",

447+

origin: "workspace",

448+

enabled: true,

449+

startup: {

450+

sidecar: true,

451+

memory: false,

452+

deferConfiguredChannelFullLoadUntilAfterListen: false,

453+

agentHarnesses: [],

454+

},

455+

compat: ["legacy-implicit-startup-sidecar"],

456+

},

457+

]),

458+

source: "derived",

459+

diagnostics: [],

460+

});

461+

loadPluginManifestRegistryForInstalledIndexMock.mockReturnValue({

462+

plugins: [{ id: "legacy-sidecar", name: "Legacy Sidecar" }],

463+

diagnostics: [],

464+

});

465+466+

const report = buildPluginRegistrySnapshotReport({ config: {} });

467+468+

expect(report.plugins[0]).toMatchObject({

469+

id: "legacy-sidecar",

470+

compat: ["legacy-implicit-startup-sidecar"],

471+

});

472+

});

473+396474

it("uses a metadata snapshot load for snapshot reports", () => {

397475

buildPluginSnapshotReport({ config: {}, workspaceDir: "/workspace" });

398476

@@ -755,6 +833,38 @@ describe("plugin status reports", () => {

755833

});

756834

});

757835836+

it("builds compatibility warnings for deprecated implicit startup sidecar metadata", () => {

837+

setSinglePluginLoadResult(

838+

createPluginRecord({

839+

id: "legacy-sidecar",

840+

name: "Legacy Sidecar",

841+

compat: ["legacy-implicit-startup-sidecar"],

842+

}),

843+

);

844+845+

expectCompatibilityOutput({

846+

notices: [

847+

createCompatibilityNotice({

848+

pluginId: "legacy-sidecar",

849+

code: "legacy-implicit-startup-sidecar",

850+

}),

851+

],

852+

warnings: [`legacy-sidecar ${LEGACY_IMPLICIT_STARTUP_SIDECAR_MESSAGE}`],

853+

});

854+

});

855+856+

it("does not warn when explicit startup-lazy metadata avoids legacy startup compatibility", () => {

857+

setSinglePluginLoadResult(

858+

createPluginRecord({

859+

id: "modern-startup-lazy",

860+

name: "Modern Startup Lazy",

861+

compat: [],

862+

}),

863+

);

864+865+

expectNoCompatibilityWarnings();

866+

});

867+758868

it("returns no compatibility warnings for modern capability plugins", () => {

759869

setSinglePluginLoadResult(

760870

createPluginRecord({

@@ -819,10 +929,14 @@ describe("plugin status reports", () => {

819929

expect(

820930

summarizePluginCompatibility([

821931

notice,

932+

createCompatibilityNotice({

933+

pluginId: "legacy-plugin",

934+

code: "legacy-implicit-startup-sidecar",

935+

}),

822936

createCompatibilityNotice({ pluginId: "legacy-plugin", code: "hook-only" }),

823937

]),

824938

).toEqual({

825-

noticeCount: 2,

939+

noticeCount: 3,

826940

pluginCount: 1,

827941

});

828942

});