Repository navigation
Conversation
neriousy
added this pull request to stack #56077
October 16, 2026 13:20
neriousy
force-pushed
the
pack-libraries
branch
from
October 16, 2026 16:08
480a8a8 to
95f8efe
Compare
A new pack-npm job applies the release version rewrite and runs the 14 library publish scripts in a pack-only mode (OPENCODE_NPM_PACK_DIR), with their typecheck, ui tests and codemode smoke install, and uploads the tarballs. It has only contents: read and no secrets. publish downloads them and sets OPENCODE_NPM_TARBALLS. script/publish.ts checks that every tarball exists and holds the expected name and version before it publishes anything, and each library script keeps its npm view check and then publishes its carried tarball instead of building again. Without either variable the scripts behave as before. The version rewrite moves to script/release-files.ts so publish and pack-npm share it.
neriousy
force-pushed
the
pack-libraries
branch
from
October 16, 2026 16:21
95f8efe to
8cb6a54
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #56074 (
publish-setup-trims) (5bcc04e, "chore(ci): skip release-only setup on dev publishes"). The bottom of the stack is #55987. Draft:publish.ymlcannot run on a pull request, so the first dev push after merge is the real test.Summary
Publish builds the 14 npm libraries one by one before each
npm publish. This PR moves that build into a newpack-npmjob that runs alongside the CLI build. Publish then only publishes the finished tarballs, in the same order.pack-npm(needsversion, skipped on beta): same version rewrite andbun installas publish, runs the 14 library scripts withOPENCODE_NPM_PACK_DIR, verifies and uploadsnpm-libraries.contents: readonly, no secrets.OPENCODE_NPM_PACK_DIR, build and copy the tarball. WithOPENCODE_NPM_TARBALLS, keepnpm view, then publish the carried tarball. With neither, unchanged.script/publish.ts: checks all 14 tarball names and versions before any release step. The version rewrite moved verbatim toscript/release-files.ts.pack-npm, downloads the artifact (not on beta). The CLI stays in publish, because AUR hashes its local tgz.Expected effect
Estimates, inferred from run logs:
pack-npm(about 2.5 to 4.5 minutes) ends beforebuild-node-cli, the signing jobs andbuild-electron. In both reference dev pushes it would. Otherwise only the overlap is saved.Evidence
bun pm packis deterministic; ten libraries should match in-place builds byte for byte. core, server, sdk and client chunk in filesystem listing order, which already differs between runs today (38814116264 vs 38856436871). Fixing that changes published output, so it is a separate PR.verifyandcarriedhandle wrong, missing and misnamed tarballs.script/pack-npm.tsend to end.Things to know
NpmLibraries.namesneed a converted script, orpack-npmfails.script/publish.ts: beta'splugin-genuiis a separate hunk; no conflict expected.publish.yml: the newneeds, download step and env line conflict with the rest of the stack.workflow_dispatchwith a bump now stops atverifybefore publishing, instead of possibly publishing libraries aslatest. So the variable stays unconditional.Verification
Rollback is a revert of this commit.
What to review:
npm publish; the carried path keepsnpm viewand respects--dry-run.NpmLibraries.namesmatchesscript/publish.ts, minuscli, in order.verifyruns before the first release side effect.script/release-files.tsis a verbatim move.pack-npmpermissions and conditions; all paths use/tmp/npm-libraries.On the first dev push, check:
pack-npmlogsverified 14 npm library tarballs; the artifact holds 14.tgzfiles, about 5 MB.Shasum:inpack-npmequals itsnpm notice shasum:in publish.pack-npmends beforebuild-node-cliand the signing jobs.On the first release: the same, plus the desktop dry-run after
verify, and commits with only version and lockfile changes.