From 254f90a4081a3f15dfe54277da922579dbaee254 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sat, 5 Sep 2026 17:33:06 +0900 Subject: feat(layout): plan 04 — ABI layout.applyOps + reset affordance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/plugin-abi/load-diff.test.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/core/plugin-abi/load-diff.test.ts') diff --git a/src/core/plugin-abi/load-diff.test.ts b/src/core/plugin-abi/load-diff.test.ts index 157b93f..f8ebf6c 100644 --- a/src/core/plugin-abi/load-diff.test.ts +++ b/src/core/plugin-abi/load-diff.test.ts @@ -160,8 +160,24 @@ describe("decideFrontendLoads — the load diff (boot / extensions-changed / wor it("the handshake checks against FRONTEND_ABI_VERSION", () => { // A range that includes the host version passes — proving the version // constant feeds the check. - expect(FRONTEND_ABI_VERSION).toBe("1"); + expect(FRONTEND_ABI_VERSION).toBe("1.1"); const d = decideFrontendLoads([c("ok")], new Map()); expect(d.incompatible).toEqual([]); }); + + it("the additive bump keeps v1 plugins loading (plan 04: ^1 spans 1.1)", () => { + // c() declares apiVersion "^1" — a bare-major range is a + // major-compatibility claim, so the 1.1 host (layout member added) still + // loads every v1 plugin. + const d = decideFrontendLoads([c("v1-plugin")], new Map()); + expect(d.toLoad.map((x) => x.id)).toEqual(["v1-plugin"]); + expect(d.incompatible).toEqual([]); + }); + + it("plugins requiring the 1.1 ABI (^1.1) load on the 1.1 host", () => { + const layout = { ...c("layout-plugin"), apiVersion: "^1.1" }; + const d = decideFrontendLoads([layout], new Map()); + expect(d.toLoad.map((x) => x.id)).toEqual(["layout-plugin"]); + expect(d.incompatible).toEqual([]); + }); }); -- cgit v1.2.3