Context
On 2026-11-09 the operator directed a new ticket for this ("a new ticket mentioning the closed one is cleaner"), after Vega's evidence from the 13.4.0 cut. #19827 ("publish.mjs prepare sets the release version itself") was closed not planned on 2026-10-16 at his direction ("bumping package.json before prepare works as is"). Its PR #19828 was closed unmerged at a reviewed head.
What the 13.4.0 cut showed:
- The bump cannot be a one-file edit. A manual bump must drop the last released note in the same commit, or
test/playwright/unit/buildScripts/release/PublishReleaseNoteOrphan.spec.mjs fails.
- The committed Portal index still points at the dropped note.
apps/portal/resources/data/releases.json keeps the reference until something regenerates it, so dev's news route fetches a 404 page.
- 13.4.0: CI caught it on #20658's first head through
test/playwright/e2e/portal/NewsTabOverflow.spec.mjs (#20599). A second commit (508dcb93f5) regenerated the index.
- 13.3.1: #20024 made the same drop without touching the index, before any spec covered news routes.
- Each cut whose notes merge before the bump pays twice: an extra ticket, PR, full CI run, review and operator merge (13.4.0: #20656 → #20658).
The Problem
The version is a manual precondition of the cut, but three things must change with it: package.json and package-lock.json, the drop of the released note, and the Portal release index. prepare already does the last two in its release commit. The manual bump splits them across two PRs and two merges, and dev breaks in the gap between those merges. Since #20599, CI refuses a bump that skips the index, so the broken news route can no longer reach dev. What remains is a second PR per cut and three coupled hand edits that each cut must remember.
The Architectural Reality
buildScripts/release/publish.mjs:60 reads the version from package.json when it loads. The comment at :61 says it "was bumped to before the cut", and the summary at :9 lists "version bumped" as a preflight condition.
prepare already does the rest, then commits to release/v<version>:
- It drops every note older than the version being released (
publish.mjs:71).
- It stamps the note.
- It runs
prepare.mjs, which regenerates the Portal release index (prepare.mjs:14 imports createReleaseIndex from buildScripts/docs/index/release.mjs).
- It runs
build-all.
releaseState.mjs:91 blocks an existing tag with "bump package.json first", and :182 ends with "(bump package.json)".
buildScripts/README.md:80 says prepare.mjs "Handles version bumping, changelog generation, and git tagging". It does none of the three.
package.json defines no preversion, version or postversion scripts (checked at origin/dev), so npm version <v> --no-git-tag-version touches only package.json and package-lock.json.
- Design authority: the operator on 2026-11-09, "a new ticket mentioning the closed one is cleaner". On the 13.4.0 evidence, it supersedes his 2026-10-16 "bumping
package.json before prepare works as is" (#19827).
The Fix
publish.mjs prepare --version <semver>.
- The preflight requires a valid semver newer than
package.json's version, its note present and no existing tag.
- The release commit sets the version first, with
npm version <v> --no-git-tag-version.
- It then runs the existing steps: the note drop, the stamp,
prepare.mjs (which propagates the version and regenerates the Portal index) and build-all. The bump, the drop and the index land in one commit.
finish derives the version from origin/dev's package.json, which the merged release PR set.
- Stale messages and docs that ask for a manual bump are corrected:
releaseState.mjs:91 and :182, publish.mjs:9 and :61, and buildScripts/README.md:80.
- Starting point: #19828's reviewed head, where it still applies. Its RA-1, to canonicalize the target version before deriving the release identity, was addressed there.
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
publish.mjs prepare --version <semver> |
the operator, 2026-11-09; #19827's design |
the release commit sets the version, then drops released notes and regenerates the Portal index |
a missing or malformed --version stops prepare before any read, naming the flag; one not newer than package.json's fails the build-step preflight, because a resumed prepare runs on its release branch, where package.json already carries the version |
publish.mjs JSDoc, buildScripts/README.md |
unit (ReleaseState.spec.mjs), --rehearse receipt |
publish.mjs finish: the version source |
the same |
read from origin/dev's package.json |
none |
publish.mjs JSDoc |
unit or --rehearse receipt |
Decision Record impact: none.
Acceptance Criteria
Out of Scope
- Note content: the stamped counts and the banner.
- Which notes
PublishReleaseNoteOrphan.spec.mjs allows.
- The SSR snapshots of example pages (middleware-v2).
Avoided Traps
- Reopening #19827: its not-planned is the operator's recorded decision. A new ticket keeps that record intact, as he directed.
- A bump script that also regenerates the index: it keeps the second PR per cut and the three coupled edits. CI already guards the window, so the only gain would be convenience.
Related
- #19827: closed not planned; this ticket supersedes its premise with the 13.4.0 evidence.
- #19828: its reviewed PR, closed unmerged.
- #20656, #20658: the 13.4.0 bump.
- #20024: the 13.3.1 bump.
- #20599: the news-route spec.
- #20655: the 13.4.0 cut record.
Not good first issue: I own it and build it, and Vega reviews.
Live latest-open + closed sweep: checked all 7 open issues (green band, under 25) and a closed search ("release version bump prepare") at 15:08Z, reading Out of Scope and Avoided Traps on #19637 and #20656. No equivalent or prior exclusion exists beyond #19827 itself.
A2A claim sweep: the last 30 messages in all read states (13:48Z to 15:06Z) carry no claim on the release pipeline. Vega's Tier 2.5 on #19827 is this ticket's source.
MC sweep ("manual version bump before release cut extra PR, released note drop, Portal release index 404"): 5 results, no prior decision beyond #19827's not-planned.
Own-assignment sweep: 0 open.
Origin Session ID: a8b5ad5e-2840-4d22-8b3b-a1b21344abe9
Retrieval Hint: "publish.mjs prepare --version release commit bump note drop Portal releases index one commit"
Context
On 2026-11-09 the operator directed a new ticket for this ("a new ticket mentioning the closed one is cleaner"), after Vega's evidence from the 13.4.0 cut. #19827 ("
publish.mjs preparesets the release version itself") was closed not planned on 2026-10-16 at his direction ("bumpingpackage.jsonbeforeprepareworks as is"). Its PR #19828 was closed unmerged at a reviewed head.What the 13.4.0 cut showed:
test/playwright/unit/buildScripts/release/PublishReleaseNoteOrphan.spec.mjsfails.apps/portal/resources/data/releases.jsonkeeps the reference until something regenerates it, sodev's news route fetches a 404 page.test/playwright/e2e/portal/NewsTabOverflow.spec.mjs(#20599). A second commit (508dcb93f5) regenerated the index.The Problem
The version is a manual precondition of the cut, but three things must change with it:
package.jsonandpackage-lock.json, the drop of the released note, and the Portal release index.preparealready does the last two in its release commit. The manual bump splits them across two PRs and two merges, anddevbreaks in the gap between those merges. Since #20599, CI refuses a bump that skips the index, so the broken news route can no longer reachdev. What remains is a second PR per cut and three coupled hand edits that each cut must remember.The Architectural Reality
buildScripts/release/publish.mjs:60reads the version frompackage.jsonwhen it loads. The comment at:61says it "was bumped to before the cut", and the summary at:9lists "version bumped" as a preflight condition.preparealready does the rest, then commits torelease/v<version>:publish.mjs:71).prepare.mjs, which regenerates the Portal release index (prepare.mjs:14importscreateReleaseIndexfrombuildScripts/docs/index/release.mjs).build-all.releaseState.mjs:91blocks an existing tag with "bump package.json first", and:182ends with "(bump package.json)".buildScripts/README.md:80saysprepare.mjs"Handles version bumping, changelog generation, and git tagging". It does none of the three.package.jsondefines nopreversion,versionorpostversionscripts (checked atorigin/dev), sonpm version <v> --no-git-tag-versiontouches onlypackage.jsonandpackage-lock.json.package.jsonbeforeprepareworks as is" (#19827).The Fix
publish.mjs prepare --version <semver>.package.json's version, its note present and no existing tag.npm version <v> --no-git-tag-version.prepare.mjs(which propagates the version and regenerates the Portal index) andbuild-all. The bump, the drop and the index land in one commit.finishderives the version fromorigin/dev'spackage.json, which the merged release PR set.releaseState.mjs:91and:182,publish.mjs:9and:61, andbuildScripts/README.md:80.Contract Ledger
publish.mjs prepare --version <semver>--versionstopspreparebefore any read, naming the flag; one not newer thanpackage.json's fails the build-step preflight, because a resumedprepareruns on its release branch, wherepackage.jsonalready carries the versionpublish.mjsJSDoc,buildScripts/README.mdReleaseState.spec.mjs),--rehearsereceiptpublish.mjs finish: the version sourceorigin/dev'spackage.jsonpublish.mjsJSDoc--rehearsereceiptDecision Record impact: none.
Acceptance Criteria
--versionstopspreparebefore any read, and one not newer thanpackage.json's fails the build-step preflight; each names the problem (unit,ReleaseState.spec.mjs).prepare --version <next> --rehearseon the current tree reports the version check as passing (receipt).package.jsonandpackage-lock.jsonto the version beforeprepare.mjsruns. The released-note drop and the regeneratedapps/portal/resources/data/releases.jsonland in that same commit (source plus--rehearsereceipt).finishderives the version fromorigin/dev.package.jsonbump.NewsTabOverflow.spec.mjsstays green ondevthroughout. This one can only be verified after merge.Out of Scope
PublishReleaseNoteOrphan.spec.mjsallows.Avoided Traps
Related
Not
good first issue: I own it and build it, and Vega reviews.Live latest-open + closed sweep: checked all 7 open issues (green band, under 25) and a closed search ("release version bump prepare") at 15:08Z, reading Out of Scope and Avoided Traps on #19637 and #20656. No equivalent or prior exclusion exists beyond #19827 itself. A2A claim sweep: the last 30 messages in all read states (13:48Z to 15:06Z) carry no claim on the release pipeline. Vega's Tier 2.5 on #19827 is this ticket's source. MC sweep ("manual version bump before release cut extra PR, released note drop, Portal release index 404"): 5 results, no prior decision beyond #19827's not-planned. Own-assignment sweep: 0 open.
Origin Session ID: a8b5ad5e-2840-4d22-8b3b-a1b21344abe9 Retrieval Hint: "publish.mjs prepare --version release commit bump note drop Portal releases index one commit"