fix(update): isolate plugin sync failures

Disable and skip plugins that fail package-update plugin sync so broken plugin packages do not fail an otherwise successful OpenClaw update.
This commit is contained in:
Vincent Koc
2026-05-04 14:06:44 -07:00
committed by GitHub
parent fdaa5a0c3d
commit 7c0f5463a5
5 changed files with 212 additions and 74 deletions

View File

@@ -222,6 +222,37 @@ describe("collectMissingPluginInstallPayloads", () => {
await fs.rm(tmpDir, { recursive: true, force: true });
}
});
it("skips disabled tracked records when requested", async () => {
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-update-plugin-payload-"));
const missingDir = path.join(tmpDir, "state", "npm", "node_modules", "@openclaw", "missing");
try {
await expect(
collectMissingPluginInstallPayloads({
env: { HOME: tmpDir } as NodeJS.ProcessEnv,
skipDisabledPlugins: true,
config: {
plugins: {
entries: {
missing: {
enabled: false,
},
},
},
},
records: {
missing: {
source: "npm",
spec: "@openclaw/missing@beta",
installPath: missingDir,
},
},
}),
).resolves.toEqual([]);
} finally {
await fs.rm(tmpDir, { recursive: true, force: true });
}
});
});
describe("shouldUseLegacyProcessRestartAfterUpdate", () => {