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

推荐订阅源

The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
V
Visual Studio Blog
T
The Blog of Author Tim Ferriss
爱范儿
爱范儿
Vercel News
Vercel News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
D
DataBreaches.Net
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
The Cloudflare Blog
宝玉的分享
宝玉的分享
V
V2EX
Microsoft Azure Blog
Microsoft Azure 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: hot reload plugin management changes (#75976) · open...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -3,10 +3,13 @@ import type { OpenClawConfig } from "../config/config.js";

33

import {

44

applyExclusiveSlotSelection,

55

buildPluginDiagnosticsReport,

6+

clearPluginRegistryLoadCache,

67

enablePluginInConfig,

78

loadPluginManifestRegistry,

9+

replaceConfigFile,

810

refreshPluginRegistry,

911

resetPluginsCliTestState,

12+

runtimeLogs,

1013

writeConfigFile,

1114

writePersistedInstalledPluginIndexInstallRecords,

1215

} from "./plugins-cli-test-helpers.js";

@@ -60,6 +63,14 @@ describe("persistPluginInstall", () => {

6063

}),

6164

});

6265

expect(writeConfigFile).toHaveBeenCalledWith(enabledConfig);

66+

expect(replaceConfigFile).toHaveBeenCalledWith({

67+

nextConfig: enabledConfig,

68+

baseHash: "config-1",

69+

writeOptions: {

70+

afterWrite: { mode: "restart", reason: "plugin source changed" },

71+

unsetPaths: [["plugins", "installs"]],

72+

},

73+

});

6374

expect(refreshPluginRegistry).toHaveBeenCalledWith({

6475

config: enabledConfig,

6576

installRecords: {

@@ -71,6 +82,82 @@ describe("persistPluginInstall", () => {

7182

},

7283

reason: "source-changed",

7384

});

85+

expect(clearPluginRegistryLoadCache).toHaveBeenCalledTimes(1);

86+

});

87+88+

it("persists installs even when runtime cache invalidation fails", async () => {

89+

const { persistPluginInstall } = await import("./plugins-install-persist.js");

90+

const baseConfig = {

91+

plugins: {

92+

entries: {},

93+

},

94+

} as OpenClawConfig;

95+

const enabledConfig = {

96+

plugins: {

97+

entries: {

98+

alpha: { enabled: true },

99+

},

100+

},

101+

} as OpenClawConfig;

102+

enablePluginInConfig.mockReturnValue({ config: enabledConfig });

103+

clearPluginRegistryLoadCache.mockImplementation(() => {

104+

throw new Error("cache unavailable");

105+

});

106+107+

const next = await persistPluginInstall({

108+

snapshot: {

109+

config: baseConfig,

110+

baseHash: "config-1",

111+

},

112+

pluginId: "alpha",

113+

install: {

114+

source: "npm",

115+

spec: "alpha@1.0.0",

116+

installPath: "/tmp/alpha",

117+

},

118+

});

119+120+

expect(next).toEqual(enabledConfig);

121+

expect(refreshPluginRegistry).toHaveBeenCalled();

122+

expect(

123+

runtimeLogs.some((line) => line.includes("Plugin runtime cache invalidation failed")),

124+

).toBe(true);

125+

});

126+127+

it("invalidates runtime cache even when registry refresh fails", async () => {

128+

const { persistPluginInstall } = await import("./plugins-install-persist.js");

129+

const baseConfig = {

130+

plugins: {

131+

entries: {},

132+

},

133+

} as OpenClawConfig;

134+

const enabledConfig = {

135+

plugins: {

136+

entries: {

137+

alpha: { enabled: true },

138+

},

139+

},

140+

} as OpenClawConfig;

141+

enablePluginInConfig.mockReturnValue({ config: enabledConfig });

142+

refreshPluginRegistry.mockRejectedValueOnce(new Error("registry unavailable"));

143+144+

const next = await persistPluginInstall({

145+

snapshot: {

146+

config: baseConfig,

147+

baseHash: "config-1",

148+

},

149+

pluginId: "alpha",

150+

install: {

151+

source: "npm",

152+

spec: "alpha@1.0.0",

153+

installPath: "/tmp/alpha",

154+

},

155+

});

156+157+

expect(next).toEqual(enabledConfig);

158+

expect(refreshPluginRegistry).toHaveBeenCalled();

159+

expect(clearPluginRegistryLoadCache).toHaveBeenCalledTimes(1);

160+

expect(runtimeLogs.some((line) => line.includes("Plugin registry refresh failed"))).toBe(true);

74161

});

7516276163

it("removes stale denylist entries before enabling installed plugins", async () => {