diff --git a/docs/release-process.md b/docs/release-process.md index ba4c8d0..ae08ca2 100644 --- a/docs/release-process.md +++ b/docs/release-process.md @@ -39,6 +39,10 @@ The verifier compares all protected files on the default branch to those tags, including additions and deletions, and pins each original tag to its reviewed commit. Do not rewrite or move old receipts, tags, or versions. +Storage's canonical product identity is `azure-storage`, with its package under +`canvases/azure-storage`. The verifier uses that same identity for its launcher, +extension, receipt and release tags; `azure-storage-canvas` is obsolete. + A new candidate for any canvas uses the reviewed `schemaVersion: 2`, `mutableDocumentation: true` contract: `release.json` and `checksums.json` enumerate protected files only, and its `SHA256SUMS` covers diff --git a/scripts/verify-plugin-marketplace.mjs b/scripts/verify-plugin-marketplace.mjs index 94a251b..86aea4d 100644 --- a/scripts/verify-plugin-marketplace.mjs +++ b/scripts/verify-plugin-marketplace.mjs @@ -47,13 +47,13 @@ const packages = { extensionPath: "com.github.copilot/extensions/azure-sre-agent", receipt: "canvases/azure-sre-agent/SHA256SUMS", }, - "azure-storage-canvas": { - path: "canvases/azure-storage-canvas", + "azure-storage": { + path: "canvases/azure-storage", manifest: ".github/plugin/plugin.json", - skills: ["./skills/azure-storage-canvas/"], - extension: "azure-storage-canvas", - extensionPath: "com.github.copilot/extensions/azure-storage-canvas", - receipt: "canvases/azure-storage-canvas/SHA256SUMS", + skills: ["./skills/azure-storage/"], + extension: "azure-storage", + extensionPath: "com.github.copilot/extensions/azure-storage", + receipt: "canvases/azure-storage/SHA256SUMS", }, "containers": { path: "canvases/containers", diff --git a/test/fixtures/marketplace.candidate.json b/test/fixtures/marketplace.candidate.json index 0260ca1..8faf2e2 100644 --- a/test/fixtures/marketplace.candidate.json +++ b/test/fixtures/marketplace.candidate.json @@ -26,13 +26,13 @@ }, { "name": "azure-sre-agent", - "version": "0.2.7", + "version": "0.4.2", "source": "canvases/azure-sre-agent" }, { - "name": "azure-storage-canvas", - "version": "0.1.1", - "source": "canvases/azure-storage-canvas" + "name": "azure-storage", + "version": "0.3.0", + "source": "canvases/azure-storage" }, { "name": "containers", diff --git a/test/plugin-marketplace.test.mjs b/test/plugin-marketplace.test.mjs index 0b4d196..c4385e7 100644 --- a/test/plugin-marketplace.test.mjs +++ b/test/plugin-marketplace.test.mjs @@ -58,9 +58,9 @@ test("requires release tags for full verification, then checks every catalog plu assert.ok(results[1].startsWith(`azure-resources-query@${versionOf("azure-resources-query")} azure-resources-query-v`)); assert.match(results[2], /canvas-authoring@0\.1\.1 canvas-authoring-v0-1-1-/); assert.match(results[3], /azure-cost-health-check@0\.4\.5 azure-cost-health-check-v0-4-5-/); - assert.match(results[4], /azure-sre-agent@0\.2\.7 azure-sre-agent-v0-2-7-/); - assert.ok(results[5].startsWith(`azure-storage-canvas@${versionOf("azure-storage-canvas")} azure-storage-canvas-v`)); - assert.equal(results[6], "containers@0.1.1 (candidate; immutable tag pending)"); + assert.ok(results[4].startsWith(`azure-sre-agent@${versionOf("azure-sre-agent")} azure-sre-agent-v`)); + assert.ok(results[5].startsWith(`azure-storage@${versionOf("azure-storage")} azure-storage-v`)); + assert.ok(results[6].startsWith(`containers@${versionOf("containers")} containers-v`)); }); test("candidate validates every reviewed package and omits only missing immutable tags", () => { @@ -74,8 +74,7 @@ test("candidate validates every reviewed package and omits only missing immutabl assert.equal(results[index], `${name}@${version} ${tags[0] ?? "(candidate; immutable tag pending)"}`); } assert.match(results[2], /canvas-authoring-v0-1-1-8af10f8/); - assert.match(results[4], /azure-sre-agent@0\.2\.7 azure-sre-agent-v0-2-7-9da2e40/); - assert.equal(results[6], "containers@0.1.1 (candidate; immutable tag pending)"); + assert.ok(results[4].startsWith(`azure-sre-agent@${versionOf("azure-sre-agent")} azure-sre-agent-v`)); }); test("candidate rejects corrupted protected payloads and checksum receipts", () => { diff --git a/test/storage-release.test.mjs b/test/storage-release.test.mjs index bf59aa6..1bd7647 100644 --- a/test/storage-release.test.mjs +++ b/test/storage-release.test.mjs @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import { execFileSync } from "node:child_process"; -import { mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs"; +import { copyFileSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; import { fileURLToPath } from "node:url"; @@ -12,7 +12,7 @@ import { verifyTagSource, } from "../scripts/verify-plugin-marketplace.mjs"; -const name = "azure-storage-canvas"; +const name = "azure-storage"; const source = `canvases/${name}`; const catalog = JSON.parse(readFileSync( new URL("../.github/plugin/marketplace.json", import.meta.url))); @@ -31,13 +31,13 @@ test("Storage accepts reviewed semantic versions without a fixed version gate", }); test("Storage rejects obsolete identities and noncanonical package sources", () => { - for (const obsolete of ["azure-storage", "azure-storage-explorer"]) { + for (const obsolete of ["azure-storage-canvas", "azure-storage-explorer"]) { assert.throws(() => verifyCurrentVersion(obsolete, "0.1.1"), /expected a reviewed product/); } for (const wrongSource of [ - "plugins/azure-storage-canvas", - "canvases/azure-storage-canvas/src", + `plugins/${name}`, + `${source}/src`, `${source}/com.github.copilot/extensions/${name}`, "canvases/azure-resources-query", { source: "github", repo: "microsoft/azure-dev-tools", path: source, ref: "main" }, @@ -81,7 +81,7 @@ test("the Storage candidate verifies its canonical plugin and protected receipt" const plugin = catalog.plugins.find((entry) => entry.name === name); assert.ok(plugin, "Storage must have a production marketplace entry"); assert.match(verifyPlugin(plugin, { candidate: true }), - /^azure-storage-canvas@\d+\.\d+\.\d+ /); + /^azure-storage@\d+\.\d+\.\d+ /); }); test("Storage rejects changes to its protected runtime, launcher, notices, icon and receipt", () => { @@ -101,6 +101,8 @@ test("Storage rejects changes to its protected runtime, launcher, notices, icon }; try { execFileSync("git", ["clone", "--quiet", "--local", "--no-hardlinks", root, clone]); + copyFileSync(join(root, "scripts/verify-plugin-marketplace.mjs"), + join(clone, "scripts/verify-plugin-marketplace.mjs")); git("config", "user.name", "Storage release policy test"); git("config", "user.email", "release-policy@example.invalid"); assert.doesNotThrow(verify);