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

推荐订阅源

博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
腾讯CDC
J
Java Code Geeks
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
雷峰网
雷峰网
B
Blog RSS Feed
博客园_首页
量子位
F
Fortinet All Blogs
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point 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(update): skip disabled plugins during post-update syn...
vincentkoc · 2026-04-29 · via Recent Commits to openclaw:main

@@ -641,6 +641,151 @@ describe("updateNpmInstalledPlugins", () => {

641641

expect(installPluginFromNpmSpecMock).toHaveBeenCalledTimes(1);

642642

});

643643644+

it.each([

645+

{

646+

source: "npm",

647+

config: {

648+

plugins: {

649+

entries: {

650+

demo: {

651+

enabled: false,

652+

config: { preserved: true },

653+

},

654+

},

655+

installs: {

656+

demo: {

657+

source: "npm" as const,

658+

spec: "@acme/demo",

659+

installPath: "/tmp/demo",

660+

resolvedName: "@acme/demo",

661+

},

662+

},

663+

},

664+

} satisfies OpenClawConfig,

665+

},

666+

{

667+

source: "ClawHub",

668+

config: {

669+

plugins: {

670+

entries: {

671+

demo: {

672+

enabled: false,

673+

config: { preserved: true },

674+

},

675+

},

676+

installs: {

677+

demo: {

678+

source: "clawhub" as const,

679+

spec: "clawhub:demo",

680+

installPath: "/tmp/demo",

681+

clawhubUrl: "https://clawhub.ai",

682+

clawhubPackage: "demo",

683+

clawhubFamily: "code-plugin",

684+

clawhubChannel: "official",

685+

},

686+

},

687+

},

688+

} satisfies OpenClawConfig,

689+

},

690+

{

691+

source: "marketplace",

692+

config: {

693+

plugins: {

694+

entries: {

695+

demo: {

696+

enabled: false,

697+

config: { preserved: true },

698+

},

699+

},

700+

installs: {

701+

demo: {

702+

source: "marketplace" as const,

703+

installPath: "/tmp/demo",

704+

marketplaceSource: "acme/plugins",

705+

marketplacePlugin: "demo",

706+

},

707+

},

708+

},

709+

} satisfies OpenClawConfig,

710+

},

711+

])("skips disabled $source installs before update network calls", async ({ config }) => {

712+

installPluginFromNpmSpecMock.mockRejectedValue(new Error("npm installer should not run"));

713+

installPluginFromClawHubMock.mockRejectedValue(new Error("ClawHub installer should not run"));

714+

installPluginFromMarketplaceMock.mockRejectedValue(

715+

new Error("marketplace installer should not run"),

716+

);

717+718+

const result = await updateNpmInstalledPlugins({

719+

config,

720+

skipDisabledPlugins: true,

721+

});

722+723+

expect(runCommandWithTimeoutMock).not.toHaveBeenCalled();

724+

expect(installPluginFromNpmSpecMock).not.toHaveBeenCalled();

725+

expect(installPluginFromClawHubMock).not.toHaveBeenCalled();

726+

expect(installPluginFromMarketplaceMock).not.toHaveBeenCalled();

727+

expect(result.changed).toBe(false);

728+

expect(result.config).toBe(config);

729+

expect(result.config.plugins?.installs?.demo).toEqual(config.plugins.installs.demo);

730+

expect(result.config.plugins?.entries?.demo).toEqual({

731+

enabled: false,

732+

config: { preserved: true },

733+

});

734+

expect(result.outcomes).toEqual([

735+

{

736+

pluginId: "demo",

737+

status: "skipped",

738+

message: 'Skipping "demo" (disabled in config).',

739+

},

740+

]);

741+

});

742+743+

it("keeps enabled tracked plugin update failures fatal when disabled skipping is enabled", async () => {

744+

installPluginFromNpmSpecMock.mockResolvedValue({

745+

ok: false,

746+

error: "registry timeout",

747+

});

748+

const config = {

749+

plugins: {

750+

entries: {

751+

demo: {

752+

enabled: true,

753+

},

754+

},

755+

installs: {

756+

demo: {

757+

source: "npm" as const,

758+

spec: "@acme/demo",

759+

installPath: "/tmp/demo",

760+

},

761+

},

762+

},

763+

} satisfies OpenClawConfig;

764+765+

const result = await updateNpmInstalledPlugins({

766+

config,

767+

skipDisabledPlugins: true,

768+

dryRun: true,

769+

});

770+771+

expect(installPluginFromNpmSpecMock).toHaveBeenCalledWith(

772+

expect.objectContaining({

773+

spec: "@acme/demo",

774+

expectedPluginId: "demo",

775+

dryRun: true,

776+

}),

777+

);

778+

expect(result.changed).toBe(false);

779+

expect(result.config).toBe(config);

780+

expect(result.outcomes).toEqual([

781+

{

782+

pluginId: "demo",

783+

status: "error",

784+

message: "Failed to check demo: registry timeout",

785+

},

786+

]);

787+

});

788+644789

it("aborts exact pinned npm plugin updates on integrity drift by default", async () => {

645790

const warn = vi.fn();

646791

installPluginFromNpmSpecMock.mockImplementation(