fix(plugins): migrate Fish Audio plugin identity (#119900)

* fix(plugins): migrate Fish Audio plugin identity

* fix(plugins): tighten Fish Audio identity migration

* fix(plugins): follow catalog selector for id replacements

* fix(plugins): reject replacement install collisions

* refactor(plugins): reuse skipped update outcomes
This commit is contained in:
Vincent Koc
2026-08-06 20:50:36 +08:00
committed by GitHub
parent c4292bc8b2
commit 52b8f9be80
23 changed files with 628 additions and 90 deletions
+31
View File
@@ -969,6 +969,37 @@ describe("plugins cli update", () => {
expect(writeConfigFile).not.toHaveBeenCalled();
});
it("blocks catalog-declared plugin id migration before updater side effects", async () => {
const cfg = {
plugins: {
entries: {
"fish-audio": { enabled: true },
},
},
} as OpenClawConfig;
primeBlockedUpdateConfig("plugins", cfg);
setInstalledPluginIndexInstallRecords({
"fish-audio": {
source: "npm",
spec: "@openclaw/fish-audio-speech@2026.7.2-beta.7",
resolvedName: "@openclaw/fish-audio-speech",
resolvedSpec: "@openclaw/fish-audio-speech@2026.7.2-beta.7",
installPath: "/tmp/fish-audio",
},
});
await expect(runPluginsCommand(["plugins", "update", "fish-audio"])).rejects.toThrow(
"__exit__:1",
);
expect(runtimeErrors.at(-1)).toContain(
"Config plugins are stored in an external or unresolved top-level $include",
);
expect(updateNpmInstalledPlugins).not.toHaveBeenCalled();
expect(updateNpmInstalledHookPacks).not.toHaveBeenCalled();
expect(writeConfigFile).not.toHaveBeenCalled();
});
it("blocks managed npm load-path reconciliation before updater side effects", async () => {
const installPath = "/tmp/openclaw/npm/projects/demo-v1/node_modules/demo";
const cfg = {