Imported as a linear vendor commit so forge rebases do not replay the upstream root tree. git-subtree-dir: third_party/pi git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
4.7 KiB
name, description
| name | description |
|---|---|
| release | Prepare, publish, verify, and recover pi releases. Use for release preparation, local release smoke tests, publishing, and failed release CI or announcements. |
Releasing pi
Run repository commands from the repo root (two directories above this skill), unless instructed otherwise.
Lockstep versioning: all packages share one version; every release updates all together. patch = fixes + additions, minor = breaking changes. No major releases.
-
Update CHANGELOGs: ask the user whether they ran the
/clprompt on the latest commit onmain. If not, they must run/clfirst to audit and update each package's[Unreleased]section before releasing. -
Local smoke test: build an unpublished release and smoke test from outside the repo (so it can't resolve workspace files):
npm run release:local -- --out /tmp/pi-local-release --force cd /tmp # Node package install smoke tests /tmp/pi-local-release/node/pi --help /tmp/pi-local-release/node/pi --version /tmp/pi-local-release/node/pi --list-models /tmp/pi-local-release/node/pi -p "Say exactly: ok" /tmp/pi-local-release/node/pi # Bun binary smoke tests /tmp/pi-local-release/bun/pi --help /tmp/pi-local-release/bun/pi --version /tmp/pi-local-release/bun/pi --list-models /tmp/pi-local-release/bun/pi -p "Say exactly: ok" /tmp/pi-local-release/bun/piVerify both Node and Bun startup, model/account listing, interactive startup, and at least one real prompt with the intended default provider. The bare commands
/tmp/pi-local-release/node/piand/tmp/pi-local-release/bun/pistart interactive mode; run each in tmux, submit a prompt, and wait for the model reply before considering the interactive smoke test passed. Failures are release blockers unless the user explicitly accepts the risk.Load and follow interactive-testing.md for the tmux workflow. Start each release binary from
/tmp, not the repo root. -
Run the release script:
PI_ALLOW_LOCKFILE_CHANGE=1 npm_config_min_release_age=0 npm run release:patch # fixes + additions PI_ALLOW_LOCKFILE_CHANGE=1 npm_config_min_release_age=0 npm run release:minor # breaking changesIf the test suite already passed in
npm run release:localand only fails from machine load,PI_RELEASE_SKIP_TESTS=1skips./test.shin the release script; checks and the packed install check still run. Use it only with the user's approval.Use
npm_config_min_release_age=0only for the release command. The repo's normal npm age gate can otherwise block the release lockfile refresh when the current workspace package version was published recently. Review any lockfile or install lock diffs the release creates before push.The release script pins the newest published model catalog for Nix (
nix/model-catalog.json) and builds the checkout with it as the Nix build does (it fails if that catalog predates main's model changes; publish one first), bumps all package versions, updates changelogs, regenerates release artifacts, runsnpm run check, commitsRelease vX.Y.Z, tagsvX.Y.Z, adds fresh## [Unreleased]changelog sections, commitsAdd [Unreleased] section for next cycle, then pushesmainand the tag. Do not rerun the release script after a tag was pushed. -
CI verifies and announces the npm release: pushing the
vX.Y.Ztag triggers.github/workflows/build-binaries.yml. Thepublish-npmjob uses npm trusted publishing through GitHub Actions OIDC with environmentnpm-publish; no localnpm publish,npm whoami, OTP, or WebAuthn flow is required. After publishing,announce-pi-dev-releaseverifies every public workspace package resolves at the exact release version and that its npm tarball is available, then writes the verified release marker to R2.pi.dev/api/latest-versionreads that marker; it must never announce a release from npm before this job succeeds. -
CI builds the Nix release: the tag push also triggers
.github/workflows/nix.yml, which builds the tagged flake on Linux and macOS and then fast-forwards thestablebranch to the release commit.nix run github:earendil-works/pi/stableruns the latest release. If the Nix build fails,stablestays on the previous release; the tag cannot be fixed, so fixmainand ship the fix in the next release. -
If CI publish or announcement fails: inspect the failed job. The publish helper is idempotent and skips package versions already present on npm; the announcement job rechecks availability before updating the R2 marker. Rerun the failed job or workflow after fixing CI or transient npm issues. Do not rerun
npm run release:patchornpm run release:minorfor the same version.