CI: tighten bundled plugin boundary ratchet

This commit is contained in:
Tak Hoffman
2026-03-16 11:24:46 -05:00
parent 1f11ff2eab
commit 70265fcc7e
2 changed files with 24 additions and 13 deletions

View File

@@ -36,6 +36,12 @@ describe("check-plugin-boundary-ratchet", () => {
});
});
it("does not reject same-plugin files that merely contain plugin-sdk-internal in the filename", () => {
expect(
classifyPluginBoundaryImport("./plugin-sdk-internal-fixture.js", extensionFile, { repoRoot }),
).toBeNull();
});
it("rejects direct core src imports", () => {
expect(
classifyPluginBoundaryImport(
@@ -87,7 +93,7 @@ describe("check-plugin-boundary-ratchet", () => {
line: 3,
preferredReplacement:
"Use openclaw/plugin-sdk/* or openclaw/plugin-sdk/compat temporarily.",
reason: "imports non-public plugin-sdk-internal surface",
reason: "reaches into non-public plugin-sdk-internal implementation",
specifier: "../../../src/plugin-sdk-internal/discord.js",
},
{
@@ -125,7 +131,7 @@ describe("check-plugin-boundary-ratchet", () => {
line: 3,
preferredReplacement:
"Use openclaw/plugin-sdk/* or openclaw/plugin-sdk/compat temporarily.",
reason: "imports non-public plugin-sdk-internal surface",
reason: "reaches into non-public plugin-sdk-internal implementation",
specifier: "../../../src/plugin-sdk-internal/discord.js",
},
{