chore: sync v2/main to 2.2.0 + guidance to bump on v2/main before the milestone merge - #2011
Conversation
… merge v2/main has been at 2.0.0 since the v2.0.0 release while main and npm `latest` are at 2.2.0. The bump was created on the milestone-merge branch, which is cut from main, so it only ever existed downstream of v2/main and nothing carried it back — `chore: 2.1.0` and `chore: 2.2.0` are both on main and neither is on v2/main. That is not cosmetic. A branch cut from a milestone-merge branch silently carries the bump into an unrelated PR — #2009 arrived with a 2.0.0 -> 2.2.0 diff on a container bugfix — and anything reading the version in development (readInspectorVersion, --version, GET /api/config) reported a version two releases old. Move the bump to v2/main, before the milestone merge, so it flows into main with the rest of the milestone's work and the branches never disagree. The release tag is applied to the resulting main commit instead. The publish workflow needs no change: its tag-vs-package.json assertion runs at the release commit on main, which still carries the bump. Deliberately not a back-merge of main into v2/main: main holds the whole pre-v2 v1 history (~230 commits v2/main lacks, retained through `chore: replace main's tree with v2`), so merging would graft all of it into the develop branch's log permanently to deliver a two-file change. Also sets v2/main to 2.2.0 as a one-time catch-up. Nothing in the repo asserts a specific version value, so this is a safe two-file change. Closes #2010 Signed-off-by: cliffhall <cliff@futurescale.com>
This repo's release tags are bare x.y.z (2.2.0, 2.1.0, 2.0.0), not v-prefixed. Also notes why the manual tag matters: npm's tag-version-prefix defaults to 'v' and the repo sets no .npmrc, so a bare `npm version` would have produced a tag that doesn't match the convention. Signed-off-by: cliffhall <cliff@futurescale.com>
Review responseFixed in 9048e69 — dropped the Verified against the actual tags rather than just taking the note: While confirming, I found the reason this is worth a warning rather than a silent fix: npm's It was never release-breaking, which is likely why it survived: the publish job asserts
|
There was a problem hiding this comment.
Pull request overview
Synchronizes v2/main with release 2.2.0 and revises the release process to prevent post-release version drift.
Changes:
- Updates root package metadata to version 2.2.0.
- Moves future version bumps before milestone merges.
- Documents branch and release-tagging rules.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
README.md |
Rewrites the v2 release procedure. |
package.json |
Bumps the package version to 2.2.0. |
package-lock.json |
Synchronizes root lockfile metadata. |
AGENTS.md |
Documents release and branching conventions. |
Suppressed comments (1)
README.md:347
- In a Bash block,
<x.y.z>is input-redirection syntax, so this documented command fails rather than creating a tag. Use the concrete release example already introduced below (or a shell variable) so the procedure is executable.
git tag <x.y.z> && git push origin <x.y.z>
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Copilot review: - `<x.y.z>` / `<major|minor|patch>` inside a bash block is shell redirection, so both documented commands were syntax errors if copied. Verified: `bash -n` rejects `git tag <x.y.z> && ...` and accepts `git tag 2.3.0 && ...`. Use a concrete 2.2.0 -> 2.3.0 example and say what to substitute. - "agree on the version at every point" / "never disagree" overstated it. The procedure deliberately bumps v2/main first, so between the bump and the milestone merge the branches differ — v2/main reads the version being built, main the one released. Describe the real invariant: they converge when the release merge lands, and v2/main is never left behind main. Signed-off-by: cliffhall <cliff@futurescale.com>
Copilot review round 1 — responsesAll three accepted and fixed in ✅ Angle-bracket placeholders break the bash blocksA genuine syntax error, not a style nit — Both blocks now use a concrete ✅ "agree at every point" / "never disagree" overstated the invariantThe best catch of the three, because the wrong claim invites precisely the misdiagnosis it warns about. Bumping Both
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
README.md:355
- The PR body and linked #2010 still show
v2.3.0/git tag v2.3.0, while this procedure correctly requires the repository’s established bare tag (2.3.0). Update those descriptions to use bare tags so the release instructions do not conflict.
⚠️ **No `v` prefix.** This repo's release tags are bare `x.y.z` — `2.2.0`, `2.1.0`, `2.0.0` — so tag `2.3.0`, not `v2.3.0`. Note npm's own `tag-version-prefix` defaults to `v` and the repo sets no `.npmrc`, so a bare `npm version` would have produced a `v`-prefixed tag that does not match the convention. Tagging by hand (step 3) is what keeps it right. The workflow's assert step strips a leading `v` before comparing, so a `v`-prefixed tag would still publish — it would just be inconsistent with every previous release.
…commit git checkout main && git pull resolves through the maintainer's configured merge/rebase strategy, so a divergent local main can produce or replay local commits. Tagging HEAD there tags a commit that is not on origin/main, and pushing only the tag leaves a release whose commit was never published. git tag <x> origin/main pins the tag to what the remote branch actually points at, regardless of local state. Signed-off-by: cliffhall <cliff@futurescale.com>
Copilot review round 3 — one finding, fixedFixed in
-git checkout main && git pull
-git tag 2.3.0 && git push origin 2.3.0
+git fetch origin main
+git tag 2.3.0 origin/main && git push origin 2.3.0
Also from round 2's suppressed comment: the PR description and #2010 still showed
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
README.md:345
- The PR description still says this flow creates “no window in which the two disagree,” which contradicts the expected in-flight difference documented here. Please update the description to say it eliminates post-release drift so the PR’s central rationale matches the finalized procedure.
Between steps 1 and 2 the two branches **do** differ, and that is expected, not drift: `v2/main` reads the version being built while `main` still reads the one currently released. What this ordering removes is *post-release* drift — once the milestone merge lands they agree again, and `v2/main` is never left **behind** `main`. If you see `v2/main` ahead of `main`, a release is in flight; if you see it behind, something went wrong.
Copilot rounds 4 and 5 — closed outCompleting the record; these two rounds were addressed but not written up here, so review 4944525585 reads as open when it is not. Round 4 (
|
| Round | Finding | Outcome |
|---|---|---|
| 1 | <x.y.z> in bash blocks is shell redirection |
fixed 4d567c97 |
| 1 | "agree at every point" overstated (README) | fixed 4d567c97 |
| 1 | same claim in AGENTS.md |
fixed 4d567c97 |
| 2 | (suppressed) PR/issue bodies showed tag v2.3.0 |
both bodies corrected |
| 3 | git pull + git tag can tag a commit not on origin/main |
fixed d0143ef8 |
| 4 | (suppressed) PR description carried the stale invariant claim | description corrected |
| 5 | — | clean |
Two of the seven arrived only in the suppressed block while the review header said "generated no new comments." Worth knowing for anyone reading a Copilot review here: the header is not the whole review.
npm run ci passes on the current head (exit 0).
Closes #2010
v2/mainhas been at2.0.0since the v2.0.0 release whilemainand npmlatestare at2.2.0. This closes the existing gap and changes the procedure so it cannot reopen.Root cause
The bump is created on the milestone-merge branch, which is cut from
main— so it exists only downstream ofv2/main, and nothing carries it back. Not an off-by-one from one missed step; it has happened every release:mainv2/maindedee5af chore: 2.1.027cd42b4 chore: 2.2.0The fix — bump on
v2/main, before the milestone mergeThe bump becomes part of the milestone's work and flows with it, so there is no back-merge and no sync step. The release tag is applied to the resulting
maincommit.To be precise about the invariant (corrected during review): the branches do differ between step 1 and step 2 —
v2/mainreads the version being built,mainthe one currently released — and that is expected, not drift. What this removes is post-release drift: they converge when the milestone merge lands, andv2/mainis never left behindmain. Ahead means a release is in flight; behind means something went wrong.The publish workflow needs no change. Its "Assert release tag matches package version" step runs at the release commit on
main, which still carries the bump — I checked this before choosing the approach.One sharp edge is called out prominently in the docs:
npm versionmust be run with--no-git-tag-version. A barenpm versionalso tags, and that tag would land on av2/maincommit while the release must be cut frommain— creating a tag on a commit that is never released.Why not a back-merge
main→v2/mainis the conventional git-flow answer and is wrong here:maincarries the entire pre-v2 v1 history (~230 commitsv2/mainlacks, retained throughec5d8e13 chore: replace main's tree with v2). Merging grafts all of it into the develop branch's log permanently in order to deliver a two-file change. A post-release sync commit avoids the graft but is still a forgettable extra step with a drift window; bumping first has neither. The README now says explicitly not to do this, so a future maintainer hitting a drift doesn't reach for the obvious tool.Why it mattered
package.json2.0.0 → 2.2.0in the diff of a container bugfix. Caught in review and rebased out, but it would have bumped the develop branch's version as a side effect of a bug fix.readInspectorVersion(),--version, andGET /api/config— so do bug reports filed from them.Changes
package.json/package-lock.json→2.2.0(one-time catch-up; matchesmainand npmlatest).README.md— Cutting a release rewritten as the three explicit steps, with the--no-git-tag-versionwarning, the rationale, and the do-not-back-merge note.AGENTS.md— the branch-flow section now states the bump rides the same flow, plus a corollary that feature branches are cut fromv2/mainand never from a milestone-merge branch (the mistake that produced fix: bind loopback by address and pin the sandbox port for containers #2009's stray diff).Verification
npm run cipasses (exit 0). Nothing in the repo asserts a specific version value — no test reads it — so the catch-up is a safe two-file change. I confirmed that before choosing this option rather than assuming it.Not mirrored into
.github/copilot-instructions.md:AGENTS.mdlists release and publishing procedure among the things deliberately absent from that file.Update (round 2 review): corrected
tag v2.3.0→tag 2.3.0in the diagram above. This repo's release tags are barex.y.z(2.2.0,2.1.0,2.0.0) — the same correction @cliffhall raised on the README, applied here and on #2010 as well so the description does not contradict the procedure it describes.