Context
While reviewing the 13.3.0 cut-prep (#19784), the operator asked why it bumps the package version, and said this "should be a step inside the release pipeline". Today the bump is a manual precondition of every cut. In earlier cuts it was documented as the operator's step; for 13.3.0 it rode in a separate PR.
The Problem
buildScripts/release/publish.mjs reads the version it releases from package.json when it loads (:60), on the assumption that package.json "was bumped to before the cut". Its preflight refuses an already-tagged version with "bump package.json first" (releaseState.mjs:91). prepare.mjs only propagates the version it finds into DefaultConfig, the ServiceWorker, the Portal footer and the Neural Link guide. Meanwhile the release commit already performs the other release mechanics itself: it drops the older notes and stamps the note's frontmatter. The version is the one step left outside the pipeline. So every cut needs an extra hand-made PR, and the version changes in a different commit from the release that ships it.
The Architectural Reality
prepare builds the release commit on release/v<version> (publish.mjs:192–257), and finish squashes the merged release PR onto main. Both key their branch, tag and note on the version.
package.json defines no preversion, version or postversion scripts, so npm version <v> --no-git-tag-version sets package.json and package-lock.json and does nothing else.
buildScripts/README.md:78 says prepare.mjs "Handles version bumping, changelog generation, and git tagging". It does none of those three.
The Fix
publish.mjs prepare --version <semver>: the preflight requires a valid version newer than package.json's, plus its note and no existing tag. The release commit sets the version with npm version <v> --no-git-tag-version before prepare.mjs propagates it.
finish reads the version from origin/dev's package.json, which the merged release PR set.
- Every message and doc that tells the operator to bump
package.json first is corrected: releaseState.mjs:91 and :182, buildScripts/README.md:78, and the publish.mjs summary.
Acceptance Criteria
Out of Scope
- Stamping the notes' counts and removing the banner. Both are note content.
- The README link pin for the note the release drops (#19784).
Related
#19652 · #19765 · #19766 · #19784
Live latest-open sweep: latest 20 open issues at 18:08Z, no equivalent. A2A claim sweep: no claim on the release pipeline. MC sweep ("release cut-prep bump package.json version before publish.mjs prepare manual step release pipeline"): earlier cuts document the bump as a manual operator step, and no decision keeps it outside the pipeline. Own-assignment sweep: 5 open. #19765 and #19766 are this cut's leaves; #19765 loses its version bump here.
Origin Session ID: bb2e8968-a6d6-4ef7-a4ed-5ab3157b1ac8
Retrieval Hint: "publish.mjs prepare --version release commit sets package version npm version no-git-tag-version"
Context
While reviewing the 13.3.0 cut-prep (#19784), the operator asked why it bumps the package version, and said this "should be a step inside the release pipeline". Today the bump is a manual precondition of every cut. In earlier cuts it was documented as the operator's step; for 13.3.0 it rode in a separate PR.
The Problem
buildScripts/release/publish.mjsreads the version it releases frompackage.jsonwhen it loads (:60), on the assumption thatpackage.json"was bumped to before the cut". Its preflight refuses an already-tagged version with "bump package.json first" (releaseState.mjs:91).prepare.mjsonly propagates the version it finds intoDefaultConfig, the ServiceWorker, the Portal footer and the Neural Link guide. Meanwhile the release commit already performs the other release mechanics itself: it drops the older notes and stamps the note's frontmatter. The version is the one step left outside the pipeline. So every cut needs an extra hand-made PR, and the version changes in a different commit from the release that ships it.The Architectural Reality
preparebuilds the release commit onrelease/v<version>(publish.mjs:192–257), andfinishsquashes the merged release PR ontomain. Both key their branch, tag and note on the version.package.jsondefines nopreversion,versionorpostversionscripts, sonpm version <v> --no-git-tag-versionsetspackage.jsonandpackage-lock.jsonand does nothing else.buildScripts/README.md:78saysprepare.mjs"Handles version bumping, changelog generation, and git tagging". It does none of those three.The Fix
publish.mjs prepare --version <semver>: the preflight requires a valid version newer thanpackage.json's, plus its note and no existing tag. The release commit sets the version withnpm version <v> --no-git-tag-versionbeforeprepare.mjspropagates it.finishreads the version fromorigin/dev'spackage.json, which the merged release PR set.package.jsonfirst is corrected:releaseState.mjs:91and:182,buildScripts/README.md:78, and thepublish.mjssummary.Acceptance Criteria
--version,preparestops before reading anything (receipt). The preflight names a version that is not newer thanpackage.json's (unit,ReleaseState.spec.mjs).prepare --version 13.3.0 --rehearseon a 13.2.0 tree reports the version check as passing (receipt).package.jsonandpackage-lock.jsonto the version beforeprepare.mjsruns (source; the 13.3.0 cut is the post-merge witness).finishderives the version fromorigin/dev.package.jsonbump.Out of Scope
Related
#19652 · #19765 · #19766 · #19784
Live latest-open sweep: latest 20 open issues at 18:08Z, no equivalent. A2A claim sweep: no claim on the release pipeline. MC sweep ("release cut-prep bump package.json version before publish.mjs prepare manual step release pipeline"): earlier cuts document the bump as a manual operator step, and no decision keeps it outside the pipeline. Own-assignment sweep: 5 open. #19765 and #19766 are this cut's leaves; #19765 loses its version bump here.
Origin Session ID: bb2e8968-a6d6-4ef7-a4ed-5ab3157b1ac8 Retrieval Hint: "publish.mjs prepare --version release commit sets package version npm version no-git-tag-version"