mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-21 09:18:39 +00:00
fix(config): soften antigravity removal fallout (#25538)
Land #25538 by @chilu18 to keep legacy google-antigravity-auth config entries non-fatal after removal (see #25862). Co-authored-by: chilu18 <chilu.machona@icloud.com>
This commit is contained in:
@@ -103,6 +103,48 @@ describe("config plugin validation", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("warns for removed legacy plugin ids instead of failing validation", async () => {
|
||||
const home = await createCaseHome();
|
||||
const removedId = "google-antigravity-auth";
|
||||
const res = validateInHome(home, {
|
||||
agents: { list: [{ id: "pi" }] },
|
||||
plugins: {
|
||||
enabled: false,
|
||||
entries: { [removedId]: { enabled: true } },
|
||||
allow: [removedId],
|
||||
deny: [removedId],
|
||||
slots: { memory: removedId },
|
||||
},
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
if (res.ok) {
|
||||
expect(res.warnings).toEqual(
|
||||
expect.arrayContaining([
|
||||
{
|
||||
path: `plugins.entries.${removedId}`,
|
||||
message:
|
||||
"plugin removed: google-antigravity-auth (stale config entry ignored; remove it from plugins config)",
|
||||
},
|
||||
{
|
||||
path: "plugins.allow",
|
||||
message:
|
||||
"plugin removed: google-antigravity-auth (stale config entry ignored; remove it from plugins config)",
|
||||
},
|
||||
{
|
||||
path: "plugins.deny",
|
||||
message:
|
||||
"plugin removed: google-antigravity-auth (stale config entry ignored; remove it from plugins config)",
|
||||
},
|
||||
{
|
||||
path: "plugins.slots.memory",
|
||||
message:
|
||||
"plugin removed: google-antigravity-auth (stale config entry ignored; remove it from plugins config)",
|
||||
},
|
||||
]),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("surfaces plugin config diagnostics", async () => {
|
||||
const home = await createCaseHome();
|
||||
const pluginDir = path.join(home, "bad-plugin");
|
||||
|
||||
Reference in New Issue
Block a user