fix(plugin-sdk): stabilize surface report after builds

This commit is contained in:
Vincent Koc
2026-06-21 21:06:01 +02:00
parent 2e7c3ace9c
commit 86fea26797
2 changed files with 25 additions and 0 deletions

View File

@@ -49,6 +49,15 @@ describe("plugin SDK surface report", () => {
expect(result.stderr).toBe("");
});
it("keeps generated package declarations out of source surface counts", () => {
const result = runSurfaceReport({
OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_FUNCTION_EXPORTS: "5186",
});
expect(result.status).toBe(1);
expect(result.stderr).toContain("public callable exports 5187 > 5186");
});
it("rejects deprecated export growth by public entrypoint", () => {
const result = runSurfaceReport({
OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_DEPRECATED_EXPORTS_BY_ENTRYPOINT: JSON.stringify({ core: 1 }),