From 4f4ddc28b4d924ec235717944c7463a71dbfe61f Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Wed, 18 Nov 2026 09:41:21 -0500 Subject: [PATCH] fix(release): supersede unpublishable 3.3.0-rc.1 The 3.3.0-rc.1 Version Packages head b46ec2e1 was generated on 61a16384 (#8736). #9080 merged afterwards without a changeset, so the bot never regenerated the PR, and #9073 was squash-merged as 32a90ee0 on base 5eb0b201 with a tree that differs from the reviewed head. Release run 44300240363 quarantined it at the provenance gate. Following RELEASING.md "Superseding an unpublishable committed prerelease", bind the committed candidate in a reviewed .changeset/release-supersession.json (release merge, committed tarball digest, reason, pending changeset pool), add the patch changeset that advances the line to 3.3.0-rc.2, and mark 3.3.0-rc.1 unpublished in the build, server and CDN worker release-status maps and the committed discovery index. The rc.1 schema, compliance and protocol bytes are unchanged. Co-Authored-By: Claude Opus 5.5 --- .changeset/release-supersession.json | 12 +++ .../supersede-unpublishable-3-3-0-rc-1.md | 5 + RELEASING.md | 11 +++ dist/schemas/index.json | 3 +- docs/reference/versions.mdx | 1 + scripts/build-schemas.cjs | 4 + server/src/schemas-middleware.ts | 1 + tests/artifact-cdn-worker.test.cjs | 48 ++++++++++ tests/release-supersession.test.cjs | 93 +++++++++++++++++++ tests/release-workflow-immutability.test.cjs | 32 +++++++ tests/schema-release-status.test.ts | 33 ++++++- workers/artifact-cdn/src/index.js | 1 + 12 files changed, 242 insertions(+), 2 deletions(-) create mode 100644 .changeset/release-supersession.json create mode 100644 .changeset/supersede-unpublishable-3-3-0-rc-1.md diff --git a/.changeset/release-supersession.json b/.changeset/release-supersession.json new file mode 100644 index 00000000000..88644f031f2 --- /dev/null +++ b/.changeset/release-supersession.json @@ -0,0 +1,12 @@ +{ + "version": "3.3.0-rc.1", + "release_commit": "32a90ee0d0fd7d66505bb14277a84eeb6d15fb79", + "protocol_sha256": "5698355f3be018c5f1b68f8417b32f4f084ee6ff7bd1e3b9ae15febaffd43a81", + "reason": "3.3.0-rc.1 cannot publish: its reviewed release head b46ec2e1804fb9fae08b3a4aede4043c235bbe7f was generated on 61a1638493297b2119a41e4cd918e00fc42a5811, and #9080 (5eb0b201f4c9e3ac4bb92ddc580c0582ecb97280, no changeset) merged before #9073 was squash-merged as 32a90ee0d0fd7d66505bb14277a84eeb6d15fb79, so the merge base parent and tree differ from the reviewed head and the provenance gate quarantined release run 44300240363. Preserve its committed bytes as unpublished and generate a freshly reviewed rc.2.", + "changesets": [ + { + "file": "supersede-unpublishable-3-3-0-rc-1.md", + "sha256": "8e1320329bbf0f9620a6491fbfae871fd0346d208d6a8719015ae0e283c34d0b" + } + ] +} diff --git a/.changeset/supersede-unpublishable-3-3-0-rc-1.md b/.changeset/supersede-unpublishable-3-3-0-rc-1.md new file mode 100644 index 00000000000..fa7f2f6d123 --- /dev/null +++ b/.changeset/supersede-unpublishable-3-3-0-rc-1.md @@ -0,0 +1,5 @@ +--- +"adcontextprotocol": patch +--- + +Keep the unpublishable 3.3.0-rc.1 bundle out of release aliases and advance through a freshly reviewed release candidate. The 3.3.0-rc.1 release head was generated before the training-agent governance fix (#9080) merged, so its merge did not match the reviewed head. The new candidate carries that fix. diff --git a/RELEASING.md b/RELEASING.md index 3f207acf237..82f78fd617d 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -683,6 +683,17 @@ consumes the marker. Review that generated PR normally and require a non-author maintainer approval on its final head before merge; only the new candidate may publish. +`3.2.0-rc.5` (#7663) and `3.3.0-rc.1` were superseded this way. `3.3.0-rc.1` +(release merge `32a90ee0d0fd7d66505bb14277a84eeb6d15fb79`, #9073) was approved +on head `b46ec2e1804fb9fae08b3a4aede4043c235bbe7f`, generated on +`61a1638493297b2119a41e4cd918e00fc42a5811`. #9080 merged after that without a +changeset, so the bot never regenerated the PR, and the squash merge's parent +and tree differed from the reviewed head. Release run `44300240363` stopped at +the provenance gate before any tag, GitHub Release or R2 write. A merge with no +changeset still moves the base of an open Version Packages PR: keep `main` +frozen from the moment a release PR is approved until it merges, or have the +PR regenerated and re-reviewed on current `main` first. + For the 2026-09-14 `3.2.0-rc.3` incident, the recovery target is `71f9cd5414454e94ccfef87ce25777ead6fad228` (#7485), whose final PR head `e7d42cbe5d7b3d05c3fcdcaa6f568b08ba131439` received human approval at diff --git a/dist/schemas/index.json b/dist/schemas/index.json index b14bbdb669b..8604213f4d8 100644 --- a/dist/schemas/index.json +++ b/dist/schemas/index.json @@ -27,9 +27,10 @@ "versions": [ { "version": "3.3.0-rc.1", - "stability": "rc", + "stability": "unpublished", "prerelease": true, "deprecated": false, + "published": false, "path": "/schemas/3.3.0-rc.1/", "index": "/schemas/3.3.0-rc.1/index.json" }, diff --git a/docs/reference/versions.mdx b/docs/reference/versions.mdx index 78413395fbd..6930e333250 100644 --- a/docs/reference/versions.mdx +++ b/docs/reference/versions.mdx @@ -51,6 +51,7 @@ Supported patches don't change stable wire surfaces. Upgrading among supported 3 | Version | Released | Notes | |---|---|---| +| 3.3.0-rc.1 | — | Not published. Its Version Packages merge did not match the reviewed release head, so the release process withheld it, and the next release candidate supersedes it. | | **3.3.0-rc.0** | 2026-11-16 | **Current 3.3 prerelease**, the first release candidate. Carries beta.6, plus the prerelease pins, unpinned discovery, and anonymous capabilities guidance, declared `sync_creatives` assignment operations (#8997), audience targeting without member push (#8996), carousel card `cta_values` (#9001), inline `submitted` branches aligned with their status files (#8934), the `by_package` guidance (#8970), scope and `signing_keys` rules for several matching `authorized_agents` entries (#9011, #9017), three renamed experimental values (#8989), an omitted `human_review_required` accepted by campaign governance (#9007), compliance gates for `audience_buy_flow` and `inline_creatives_without_sync` (#9013, #9005), the public test agent's `3.3-beta.6` preview (#9018), reserved-word-safe replacements for six enum values, with the originals deprecated (#8915), and the Instagram, Facebook, Snapchat and X distribution identifier types (#8995). `@adcp/sdk` 17.0.0-beta.29 and Python `adcp` 10.0.0b20 embed it. See the [3.3 prerelease program](/docs/reference/3-3-beta). | | 3.3.0-beta.6 | 2026-11-13 | Superseded. Opens the schemas that were closed by accident (DR-0036) and applies the closed-schema triage, which removes or moves the beta fields on deprecated tasks and on the commercial terms held closed until 4.0. `@adcp/sdk` 17.0.0-beta.24 through 17.0.0-beta.28 and Python `adcp` 10.0.0b17 through 10.0.0b19 embed it. | | 3.3.0-beta.5 | 2026-11-07 | Superseded. Experimental match keys, `sales-fixed-rate` promoted to stable, and the bundled Public Suffix List. `@adcp/sdk` 17.0.0-beta.21 through 17.0.0-beta.23 and Python `adcp` 10.0.0b13 through 10.0.0b16 embed it. | diff --git a/scripts/build-schemas.cjs b/scripts/build-schemas.cjs index 810d0e47a86..94c6e8d4a99 100644 --- a/scripts/build-schemas.cjs +++ b/scripts/build-schemas.cjs @@ -189,10 +189,14 @@ function transformPublishedSchemaText(content, version) { // artifacts remain available, but non-selectable releases must never win // latest/major/minor aliases. 3.2.0 is the permanently withdrawn June 2026 // accidental cut; 3.2 GA ships as 3.2.1 (.changeset/withdrawn-release.json). +// 3.2.0-rc.5 and 3.3.0-rc.1 are committed candidates that were superseded +// without publication (RELEASING.md, "Superseding an unpublishable committed +// prerelease"). const RELEASE_STATUS_OVERRIDES = new Map([ ['3.1.3', 'withdrawn'], ['3.2.0-rc.5', 'unpublished'], ['3.2.0', 'unpublished'], + ['3.3.0-rc.1', 'unpublished'], ]); function isSelectableRelease(version) { diff --git a/server/src/schemas-middleware.ts b/server/src/schemas-middleware.ts index 3bad1dc6cc2..cb4e3e067a7 100644 --- a/server/src/schemas-middleware.ts +++ b/server/src/schemas-middleware.ts @@ -16,6 +16,7 @@ export const RELEASE_STATUS_OVERRIDES: ReadonlyMap { }); }); + describe('3.3.0-rc.1 superseded without publication', () => { + // Worst case: rc.1 objects reached R2 although no tag or GitHub Release + // exists. Its exact bytes stay addressable, but it must never be listed as + // a candidate or be what a missing later candidate resolves to. + const supersededEnv = () => ({ + ARTIFACTS: new MockBucket([ + ...['3.2.11', '3.3.0-rc.0', '3.3.0-rc.1'].flatMap((version) => [ + object(`schemas/${version}/index.json`, JSON.stringify({ version })), + object(`compliance/${version}/index.json`, JSON.stringify({ version })), + object(`protocol/${version}.tgz`, `${version}-tarball`), + ]), + ]), + }); + const fetchSuperseded = async (path) => { + const { clearVersionCacheForTests, handleRequest } = await loadWorker(); + clearVersionCacheForTests(); + return handleRequest(new Request(`https://artifacts.example${path}`), supersededEnv(), {}); + }; + + it('marks 3.3.0-rc.1 unpublished like build-schemas and the server middleware', async () => { + for (const mount of ['schemas', 'compliance']) { + const body = await (await fetchSuperseded(`/${mount}/`)).json(); + assert.deepEqual(body.versions.find((entry) => entry.version === '3.3.0-rc.1'), { + version: '3.3.0-rc.1', + stability: 'unpublished', + prerelease: true, + deprecated: false, + published: false, + path: `/${mount}/3.3.0-rc.1/`, + }); + assert.equal(body.latest_stable, '3.2.11'); + assert.ok(!body.aliases.some((entry) => entry.resolves_to === '3.3.0-rc.1')); + } + }); + + it('never resolves a missing later candidate to the superseded 3.3.0-rc.1 bytes', async () => { + const { resolvePinnedFallback } = await loadWorker(); + const known = ['3.3.0-rc.1', '3.3.0-rc.0', '3.2.11']; + assert.equal(resolvePinnedFallback(known, '3.3.0-rc.2'), '3.3.0-rc.0'); + assert.equal(resolvePinnedFallback(known, '3.3.0'), '3.2.11'); + + const pending = await fetchSuperseded('/schemas/3.3.0-rc.2/index.json'); + assert.equal(pending.status, 200); + assert.deepEqual(await pending.json(), { version: '3.3.0-rc.0' }); + assert.equal(pending.headers.get('cache-control'), 'public, no-cache, must-revalidate'); + }); + }); + it('serves protocol files without alias rewriting', async () => { const response = await fetchPath('/protocol/latest.tgz'); diff --git a/tests/release-supersession.test.cjs b/tests/release-supersession.test.cjs index c1644692789..d2c56a734c5 100644 --- a/tests/release-supersession.test.cjs +++ b/tests/release-supersession.test.cjs @@ -154,3 +154,96 @@ test('pending release fence accepts artifacts only through the reviewed superses assert.notEqual(unreviewed.status, 0); assert.match(unreviewed.stderr, /git ls-remote --exit-code/); }); + +test('supersession tolerates unrelated commits but not new changesets or changed candidate bytes', (t) => { + const f = fixture(t); + + // 3.3.0-rc.1 shape: a code fix without a changeset lands after the release + // merge. It does not change the reviewed pool, so the marker stays valid. + fs.mkdirSync(path.join(f.root, 'server'), { recursive: true }); + fs.writeFileSync(path.join(f.root, 'server/fix.ts'), 'export const fixed = true;\n'); + f.git('add', '.'); + f.git('commit', '-qm', 'Unrelated fix without a changeset'); + const unrelated = f.run(); + assert.equal(unrelated.status, 0, unrelated.stderr); + + // Any changeset that lands after review changes the pool the next + // candidate would consume, so main must stay frozen until it publishes. + fs.writeFileSync(path.join(f.root, '.changeset/late.md'), '---\n"adcontextprotocol": patch\n---\n\nLate.\n'); + const late = f.run(); + assert.notEqual(late.status, 0); + assert.match(late.stderr, /Pending changesets differ/); + fs.unlinkSync(path.join(f.root, '.changeset/late.md')); + + fs.appendFileSync(path.join(f.root, 'dist/compliance/3.2.0-rc.5/index.yaml'), 'edited: true\n'); + f.git('add', '.'); + f.git('commit', '-qm', 'Edit superseded bytes'); + const edited = f.run(); + assert.notEqual(edited.status, 0); + assert.match(edited.stderr, /Superseded release artifacts changed after their release merge/); +}); + +test('the repository supersession marker binds its committed candidate', (t) => { + const markerPath = path.join(repositoryRoot, '.changeset', 'release-supersession.json'); + if (!fs.existsSync(markerPath)) { + t.skip('No pending supersession; the next Version Packages cut consumed it.'); + return; + } + const marker = JSON.parse(fs.readFileSync(markerPath, 'utf8')); + const gitInRepo = (...args) => + execFileSync(realGit, args, { + cwd: repositoryRoot, + maxBuffer: 256 * 1024 * 1024, + stdio: ['ignore', 'pipe', 'pipe'], + }); + + assert.deepEqual( + Object.keys(marker).sort(), + ['changesets', 'protocol_sha256', 'reason', 'release_commit', 'version'], + ); + assert.match(marker.version, /^\d+\.\d+\.\d+-rc\.\d+$/); + assert.match(marker.release_commit, /^[a-f0-9]{40}$/); + assert.ok(marker.reason.trim().length >= 40); + + const pkg = JSON.parse(fs.readFileSync(path.join(repositoryRoot, 'package.json'), 'utf8')); + assert.equal(pkg.version, marker.version, 'The marker must name the committed candidate.'); + const { RELEASE_STATUS_OVERRIDES } = require(path.join(repositoryRoot, 'scripts', 'build-schemas.cjs')); + assert.equal( + RELEASE_STATUS_OVERRIDES.get(marker.version), + 'unpublished', + 'A superseded candidate must be unpublished in release discovery.', + ); + + // Read committed bytes from Git so a sparse checkout without dist/protocol + // still checks the digest. + const tarball = `dist/protocol/${marker.version}.tgz`; + assert.equal(sha256(gitInRepo('cat-file', 'blob', `HEAD:${tarball}`)), marker.protocol_sha256); + assert.equal( + gitInRepo('cat-file', 'blob', `HEAD:${tarball}.sha256`).toString('utf8').split(/\s+/)[0], + marker.protocol_sha256, + ); + const releaseCommitAvailable = spawnSync(realGit, ['cat-file', '-e', `${marker.release_commit}^{commit}`], { + cwd: repositoryRoot, + }).status === 0; + if (releaseCommitAvailable) { + assert.equal( + JSON.parse(gitInRepo('show', `${marker.release_commit}:package.json`).toString('utf8')).version, + marker.version, + ); + assert.equal( + sha256(gitInRepo('cat-file', 'blob', `${marker.release_commit}:${tarball}`)), + marker.protocol_sha256, + ); + } + + const pending = fs + .readdirSync(path.join(repositoryRoot, '.changeset')) + .filter((name) => name.endsWith('.md') && name !== 'README.md') + .sort() + .map((file) => ({ file, sha256: sha256(fs.readFileSync(path.join(repositoryRoot, '.changeset', file))) })); + assert.deepEqual( + pending, + [...marker.changesets].sort((a, b) => a.file.localeCompare(b.file)), + 'Pending changesets must match the reviewed supersession pool; keep main frozen until the next candidate publishes.', + ); +}); diff --git a/tests/release-workflow-immutability.test.cjs b/tests/release-workflow-immutability.test.cjs index 8259cd5f55e..bc525b949a4 100644 --- a/tests/release-workflow-immutability.test.cjs +++ b/tests/release-workflow-immutability.test.cjs @@ -298,6 +298,38 @@ assert.strictEqual( 'The read-only verification job must authenticate its GitHub Release absence check.' ); +{ + // The documented supersession dispatch (used for 3.2.0-rc.5 and + // 3.3.0-rc.1) must name exactly the inputs this workflow declares. + const releasing = fs.readFileSync(path.join(repoRoot, 'RELEASING.md'), 'utf8'); + const sectionStart = releasing.indexOf('### Superseding an unpublishable committed prerelease'); + assert.notStrictEqual(sectionStart, -1, 'RELEASING.md must document prerelease supersession.'); + const section = releasing.slice(sectionStart); + const dispatch = section.match(/gh workflow run release\.yml --ref main \\\n((?:\s+-f [a-z_]+=\S+(?: \\)?\n)+)/); + assert(dispatch, 'RELEASING.md must give the exact supersession dispatch command.'); + const documentedInputs = Object.fromEntries( + [...dispatch[1].matchAll(/-f ([a-z_]+)=(\S+)/g)].map(([, name, value]) => [name, value]) + ); + assert.deepStrictEqual( + documentedInputs, + { release_commit: '"$MAIN_SHA"', prepare_next: 'true' }, + 'The supersession dispatch must target the exact current main SHA in prepare_next mode.' + ); + for (const name of Object.keys(documentedInputs)) { + assert( + Object.hasOwn(workflowConfig.on.workflow_dispatch.inputs, name), + `RELEASING.md dispatches release.yml with undeclared input ${name}.` + ); + } +} + +assert( + artifactDetection.indexOf('node scripts/check-release-supersession.cjs verify') !== -1 && + artifactDetection.indexOf('node scripts/check-release-supersession.cjs verify') < + artifactDetection.indexOf('node scripts/check-release-state.cjs current'), + 'A supersession dispatch must re-verify the reviewed marker before the strict branch fence and Changesets.' +); + assert.strictEqual( verificationJob.outputs.target_commit, '${{ steps.release-target.outputs.commit }}', diff --git a/tests/schema-release-status.test.ts b/tests/schema-release-status.test.ts index 2da9fe3d081..f91f0c9a60d 100644 --- a/tests/schema-release-status.test.ts +++ b/tests/schema-release-status.test.ts @@ -37,6 +37,19 @@ describe('schema release discovery status', () => { deprecated: false, published: false, }); + + expect(isSelectableRelease('3.3.0-rc.1')).toBe(false); + expect(getReleaseMetadata('3.3.0-rc.1')).toEqual({ + stability: 'unpublished', + prerelease: true, + deprecated: false, + published: false, + }); + expect(middleware.isSelectableRelease('3.3.0-rc.1')).toBe(false); + expect(worker.isSelectableRelease('3.3.0-rc.1')).toBe(false); + // The neighbouring candidates stay selectable. + expect(isSelectableRelease('3.3.0-rc.0')).toBe(true); + expect(isSelectableRelease('3.3.0-rc.2')).toBe(true); }); it('marks v2 releases deprecated without removing them from aliases', () => { @@ -59,10 +72,27 @@ describe('schema release discovery status', () => { const withdrawn = discovery.versions.find(({ version }: { version: string }) => version === '3.1.3'); const aliasTargets = Object.values(discovery.aliases); - expect(['3.1.3', '3.2.0', '3.2.0-rc.5']).not.toContain(discovery.latest_stable); + expect(['3.1.3', '3.2.0', '3.2.0-rc.5', '3.3.0-rc.1']).not.toContain(discovery.latest_stable); expect(aliasTargets).not.toContain('3.1.3'); expect(aliasTargets).not.toContain('3.2.0'); expect(aliasTargets).not.toContain('3.2.0-rc.5'); + expect(aliasTargets).not.toContain('3.3.0-rc.1'); + + // The committed file-based discovery document carries the same status. + const committed = require('../dist/schemas/index.json'); + const supersededEntry = { + version: '3.3.0-rc.1', + stability: 'unpublished', + prerelease: true, + deprecated: false, + published: false, + path: '/schemas/3.3.0-rc.1/', + index: '/schemas/3.3.0-rc.1/index.json', + }; + expect(discovery.versions.find(({ version }: { version: string }) => version === '3.3.0-rc.1')) + .toEqual(supersededEntry); + expect(committed.versions.find(({ version }: { version: string }) => version === '3.3.0-rc.1')) + .toEqual(supersededEntry); expect(withdrawn).toMatchObject({ stability: 'withdrawn', deprecated: true, @@ -81,6 +111,7 @@ describe('withdrawn 3.2.0 and the 3.2.1 GA', () => { ['3.1.3', 'withdrawn'], ['3.2.0', 'unpublished'], ['3.2.0-rc.5', 'unpublished'], + ['3.3.0-rc.1', 'unpublished'], ]); expect(sorted(worker.releaseStatusOverrides())).toEqual(build); expect(sorted(middleware.RELEASE_STATUS_OVERRIDES)).toEqual(build); diff --git a/workers/artifact-cdn/src/index.js b/workers/artifact-cdn/src/index.js index 27ecce46ff3..587739c0c9f 100644 --- a/workers/artifact-cdn/src/index.js +++ b/workers/artifact-cdn/src/index.js @@ -30,6 +30,7 @@ const RELEASE_STATUS_OVERRIDES = new Map([ ["3.1.3", "withdrawn"], ["3.2.0-rc.5", "unpublished"], ["3.2.0", "unpublished"], + ["3.3.0-rc.1", "unpublished"], ]); export function isSelectableRelease(version) {