fix(plugins): invalidate index on policy changes · openclaw/openclaw@36219b0
vincentkoc
·
2026-04-25
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -154,6 +154,30 @@ describe("installed plugin index persistence", () => {
|
154 | 154 | }, |
155 | 155 | }); |
156 | 156 | |
| 157 | +await expect( |
| 158 | +inspectPersistedInstalledPluginIndex({ |
| 159 | + stateDir, |
| 160 | +candidates: [candidate], |
| 161 | +config: { |
| 162 | +plugins: { |
| 163 | +entries: { |
| 164 | +demo: { |
| 165 | +enabled: false, |
| 166 | +}, |
| 167 | +}, |
| 168 | +}, |
| 169 | +}, |
| 170 | + env, |
| 171 | +}), |
| 172 | +).resolves.toMatchObject({ |
| 173 | +state: "stale", |
| 174 | +refreshReasons: ["policy-changed"], |
| 175 | +persisted: current, |
| 176 | +current: { |
| 177 | +plugins: [expect.objectContaining({ pluginId: "demo", enabled: false })], |
| 178 | +}, |
| 179 | +}); |
| 180 | + |
157 | 181 | fs.writeFileSync( |
158 | 182 | path.join(pluginDir, "openclaw.plugin.json"), |
159 | 183 | JSON.stringify({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。