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:
Peter Steinberger
2026-02-24 23:02:45 +00:00
parent 039ae0b77c
commit bf8ca07deb
3 changed files with 62 additions and 16 deletions

View File

@@ -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");