Skip to content

Latest commit

 

History

History
273 lines (211 loc) · 14.2 KB

releasing.md

File metadata and controls

273 lines (211 loc) · 14.2 KB

Releasing

What ships

PyPI receives a wheel and source distribution. The wheel includes the Python SDK, CLI, REST API, MCP server, and compiled browser app. The packaging tests verify that the installed wheel serves the app.

The npm release contains @visionset/annotator, @visionset/media, and @visionset/ui-core. @visionset/app is private and its bundle ships in the Python wheel. @visionset/browser-inference is private too: it is not published to npm, and it ships only inside that app bundle, together with the ONNX Runtime WebAssembly files and their notices. The agent plugin has its own manifests, generated from the same repository version, and the GitHub Release carries the Gemini CLI extension archive, because Gemini installs only from a release asset.

Use the PyPI release history to find published versions and GitHub Releases for the notes tied to each tag. A published version is immutable. Publish a new version to make a correction.

The npm scope

Publish with pnpm so it rewrites workspace:* dependencies to concrete versions during packing. Publish annotator and media before ui-core, which depends on both. The media package includes its browser decoding worker and third-party notices.

The npm workflow's dist-tag input defaults to auto, which scripts/npm_dist_tag.mjs resolves: a stable version goes to latest, and a prerelease goes to latest only while no stable version is published, otherwise to beta. Naming latest for a prerelease once a stable version exists is refused. Trusted publishing can publish a package, but changing a dist-tag after publication requires an authenticated npm session.

Cutting a release

1. Bump the version and assemble the changelog

Release preparation is one pull request titled chore(release): <version>. Apart from chore(changelog): … maintenance, it is the only change that may edit CHANGELOG.md.

Edit the repository's VERSION file. Use the versioning guide to map the Python version to npm semver and the Git tag.

pnpm version:sync
pnpm version:check
python3 agent-plugins/tools/render_manifests.py
uv sync --locked --reinstall-package visionset
uv run python scripts/export_openapi.py

Reinstalling refreshes the editable package metadata used by the OpenAPI generator. A version-only bump updates info.version in openapi.json. The generated TypeScript client can stay unchanged because it consumes the API operations and schemas.

Then turn the release-note fragments into the version's section, with the release date stated explicitly:

node scripts/changelog.mjs preview --date 2026-12-05
node scripts/changelog.mjs assemble --date 2026-12-05

preview prints the section and writes nothing. assemble writes ## [<VERSION>] — <date> under ## [Unreleased], grouped by category with each issue linked, carries over any release summary written under ## [Unreleased], points the [Unreleased] comparison at the new tag, and deletes exactly the fragments it wrote, all in the working tree for the release pull request to commit. It refuses an invalid fragment, a missing date, an empty changelog.d/ and a version that already has a section, and changes nothing when it does, so it cannot write a release twice. A fragment merged after assembly stays in changelog.d/ for the next release. Published sections and the archive are never rewritten.

2. Run the release checks

Follow the release gate and make sure CI is green for the commit you will tag. Exercise the built artifacts locally:

bash scripts/build_dist.sh
VISIONSET_REQUIRE_WHEEL=1 uv run pytest tests/packaging
uv run python examples/thirty_minute_flow.py
bash scripts/verify_npm_packages.sh

build_dist.sh also writes dist/SHA256SUMS for the wheel and sdist. The packaging tests refuse a wheel that does not match it, and CI checks it again before testing each Python version.

3. Tag the release

Set release_tag to the v-prefixed npm version produced by pnpm version:sync. Confirm the tagged commit contains the intended VERSION before pushing.

release_tag="v$(node -p 'require("./frontend/ui-core/package.json").version')"
git tag "$release_tag"
git show "$release_tag:VERSION"
git push origin "$release_tag"

4. Publish to PyPI and GitHub

Dispatch the PyPI workflow against the release tag. The workflow refuses a ref that is not the tag derived from VERSION, then builds the wheel and source distribution from that ref and uploads them through PyPI Trusted Publishing. It also builds and checks the Gemini extension archive, on a dry run too, and uploads it with its SHA256SUMS as the workflow artifact gemini-extension-<tag>.

It dry-runs by default: the dry-run input is true unless you set it to false, and a dry run builds and checks the artifacts but uploads nothing to PyPI. Run it once as a dry run, then dispatch it again with the upload enabled.

gh workflow run publish-pypi.yml --ref "$release_tag"
gh workflow run publish-pypi.yml --ref "$release_tag" -f dry-run=false

After the workflow succeeds, create the GitHub Release for the same tag. Its notes are the version's assembled section of CHANGELOG.md, which notes prints with relative links made absolute to the tag. Include --prerelease for a beta.

Attach the Gemini archive from the publishing run. The two files are the same bytes under the linux. and darwin. names Gemini selects an asset by. Attach nothing else under a name that starts with another platform, and do not attach the archive under an unprefixed name next to other assets, because Gemini then falls back to the source tarball, which cannot install.

run_id=$(gh run list --workflow publish-pypi.yml --branch "$release_tag" --status success \
  --limit 1 --json databaseId --jq '.[0].databaseId')
rm -rf dist-gemini
gh run download "$run_id" -n "gemini-extension-$release_tag" -D dist-gemini
(cd dist-gemini && sha256sum --check --strict SHA256SUMS)
npm_version="${release_tag#v}"
node scripts/changelog.mjs notes > notes.md
gh release create "$release_tag" --verify-tag --prerelease \
  --title "VisionSet $(cat VERSION)" --notes-file notes.md \
  "dist-gemini/linux.visionset-gemini-extension-$npm_version.tar.gz" \
  "dist-gemini/darwin.visionset-gemini-extension-$npm_version.tar.gz"

The build is reproducible, so python3 agent-plugins/tools/build_archive.py --out-dir <empty dir> from the tagged checkout is an independent check: its first output line, the digest of the uncompressed tar, must equal the one in the workflow's "Build and check the Gemini CLI extension archive" step. Compare that line rather than the compressed files, whose bytes can differ with the zlib on the machine.

5. Publish the npm packages

Dispatch the npm workflow against the same tag. It applies the same tag check as the PyPI workflow, packs the packages, checks that their dependencies resolve to concrete versions, and publishes them in dependency order using npm Trusted Publishing.

It also dry-runs by default. A dry run passes --dry-run to each pnpm publish, so the packages are packed and checked but not uploaded. Pass -f dry-run=false to publish. The "Resolve the dist-tag" step prints the tag the packages will be published under.

gh workflow run publish-npm.yml --ref "$release_tag"
gh workflow run publish-npm.yml --ref "$release_tag" -f dry-run=false

6. Verify it from outside

Use fresh directories so local workspace packages and editable installs cannot mask a packaging problem. Run these commands from the tagged checkout after both workflows finish:

python_version=$(cat VERSION)
npm_version=$(node -p 'require("./frontend/ui-core/package.json").version')

(
  cd "$(mktemp -d)"
  uv venv
  uv pip install --no-cache "visionset==$python_version"
  .venv/bin/visionset --version
  .venv/bin/visionset format list
  .venv/bin/visionset init ./workspace
  .venv/bin/visionset server --workspace ./workspace
)

(
  cd "$(mktemp -d)"
  npm init -y >/dev/null
  npm install --no-save "@visionset/ui-core@$npm_version"
  node -p 'require("./node_modules/@visionset/ui-core/package.json").dependencies'
)

For Gemini CLI, install the published archive in a throwaway profile, naming the tag because Gemini never selects a prerelease as the latest release. This needs a trusted folder and a workspace:

GEMINI_CLI_HOME="$(mktemp -d)" gemini extensions install https://github.com/Robomous/VisionSet --ref "$release_tag" --consent

While the server runs, open http://127.0.0.1:8000/app and confirm the browser app loads. Stop the server to continue to the npm check. The installed ui-core package should list concrete versions of annotator and media. If npm returns a 404 immediately after publishing, retry after registry replication has had time to complete.

Release candidates and the go/no-go

Testing a release and verifying a published one answer different questions, so they are kept apart.

Before publication, a release candidate is a pinned commit. Build the wheel, sdist and npm tarballs from that commit and run the installed-artifact tests against those files, not against the source tree. The candidate is bound to the tag derived from VERSION, and a change to the commit makes it a new candidate whose evidence starts over. The publish workflows dry-run by default so the build and the checks can be repeated without uploading.

After publication, step 6 installs what the registries serve. It can only confirm what was published. It cannot undo it.

Publication needs a separate maintainer go/no-go. Green checks, a complete evidence index and a dry run do not authorize it. Tagging, dispatching with dry-run=false and creating the GitHub Release follow the decision; they do not make it.

Evidence index

One row per gate. A gate is recorded when its evidence names the pinned commit, the commands run with their results, the known limitations, and the pull request or decision record. The support matrix is the page the candidate is judged against.

Gate Tracking issue Evidence Status
Scope and support matrix frozen #1311 Support matrix version 2, ratified 2026-12-01 at 30140db9; #1418 Recorded
Support matrix matches the candidate #1311 Not yet recorded
Security, privacy and dependency audit #1320 Not yet recorded
Installed-artifact SDK, REST, CLI and MCP conformance #1318 Not yet recorded
External consumers and real-data workflows #1322 Not yet recorded
Durability, backup, migration and interrupted jobs #1319 Not yet recorded
Performance and resource budgets #1321 Not yet recorded
README and documentation accuracy #1325 Not yet recorded
Curation, membership and correction-to-release integrity #1326 Not yet recorded
Open-bug triage Not yet recorded
P2 deferrals (#1250, #1251, #1252, #1269) Support matrix version 2, approved future work 2026-12-01; #1418 Recorded

Rollback, yank and deprecation

A published version is immutable, so there is no rollback to a previous state. The correction is a new version, cut by the steps above, that supersedes the bad one. Until it ships, the tools below limit who picks up the bad version. None of them removes it.

PyPI. Yank the release from its page on pypi.org. A yanked version stays downloadable and installs only when requested by an exact pin such as visionset==VERSION, so an unpinned pip install or uv pip install skips it. Yanking is reversible.

npm. Mark each affected version deprecated. Installing it prints the message, and the version stays installable.

npm deprecate "@visionset/ui-core@$npm_version" "Use the corrected release. Reason: ..."

An empty message clears the deprecation. If the bad version holds a dist-tag, move the tag to a good version with npm dist-tag add "@visionset/ui-core@$good_version" latest. Both commands need an authenticated npm session, because trusted publishing authorizes npm publish only. Do the same for each of @visionset/annotator, @visionset/media and @visionset/ui-core that shipped the bad version.

Do not unpublish. It breaks every install that pins the version, and an unpublished version number can never be reused.

Edit the GitHub Release notes for the bad tag to name the corrected version, and leave the tag in place.

Release announcement checklist

The announcement is written after step 6 passes, from the published artifacts. It states:

  • The exact version, in its PyPI and npm spellings, and the tag.
  • The channel: stable or prerelease, and the npm dist-tag it was published under.
  • A link to the support matrix for what it supports.
  • The known limitations, linked from limitations, including any gate whose evidence records a limit.
  • The upgrade note: the workspace format and migration behavior from the previous version, and any breaking change under the compatibility rules.
  • Where to report a problem.