Skip to content

release: chant's own releases on chant release cut and publish, unsigned (#4040) - #4209

Merged
lex00 merged 4 commits into
mainfrom
release/4040-workstation
Oct 21, 2026
Merged

lex00 merged 4 commits into
mainfrom
release/4040-workstation

Conversation

@lex00

@lex00 lex00 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

#4040: chant's own releases run on the workstation release command. Nothing is signed: no --sign, no key and no allowed_signers entry. Signing is opt-in since #4174.

Merge after 0.124.34 is published. That release goes through just release-legacy, the old recipe under a new name.

  • just release [major|minor|patch] [<commit>] [--dry-run] picks the newest green commit on main (still scripts/release-preflight.sh) and runs chant release cut <version> --at <commit> --yes from release/. No version-bump commit is made. The version is one past the highest found in any package.json at the commit or in a chant-v* or release/npm/* tag, because package.json no longer moves with a release. The cut pushes chant/lifecycle, and the recipe pushes release/npm/<version> (the cut never pushes it, release-workstation.ts:183). It also tags the reference workspace on a minor or major release. --dry-run runs the cut without --yes.
  • release/ is a new workspace member, npm (kind chant). Its chant.config.ts declares one environment and release.publish: one npm target listing 24 tarballs in .release/packs/, core first, in publish-packages.sh's dependency layers. packages.component.ts deploys nothing; a cut needs a component to compile.
  • scripts/release-pack.sh <version> sets every package to the version, with @intentius/* ranges at ^<version> (release_apply_version, the old apply_bump). It packs with DRY_RUN=1 PACK_ALL=1 publish-packages.sh and copies each tarball to .release/packs/<dir>.tgz (ignored by git). Then it restores the package.json files and the lockfile, since release publish refuses a changed tree (release-publish.ts:421). A publish never builds (publish-targets.ts:59), so CI packs before it publishes.
  • The npm publish target gains stage: false, which publishes each package straight to latest (or the publish's tag) with no next stage and no npm dist-tag move. chant's packages need it: over trusted publishing, a dist-tag move needs "Allow npm dist-tag" on each package's record, and Trusted publishing: allow npm dist-tag on all 23 package records, and audit it #3904 closed that as won't-do. The default is unchanged.
  • publish.yml adds release/npm/* to its tags and a release-publish job. The job needs audit, runs npm ci and release-pack.sh, then chant release publish <version> --yes from release/, with id-token: write and contents: write for the publish record. The legacy publish and untag jobs skip release/ tags.
  • scripts/release-preflight.sh, scripts/publish-packages.sh and just release-legacy stay until two releases have gone through the new path.

Docs: the release section of lexicon-authoring/ci-integration, step 7 of onboarding-skill (a new lexicon adds its line to release/chant.config.ts), the stage row in reference/publish-targets, and the sentence in cli/ci that tied #4040 to signing is removed.

Dry run, in a scratch clone of this branch with a local bare origin and a local ci/green tag (CHANT_RELEASE_SKIP_PREFLIGHT=1, because the scratch origin has no CI):

Release 0.124.34 from 4b2f978e6 (release: chant's own releases cut with chant release cut and publish with chant release publish (#4040))
Dry run: cut 0.124.34 from commit 4b2f978e6db5 (on origin/main, green)
  not signed
  tag release/npm/0.124.34, made here and not pushed
  npm: 0 template(s)
What will be published where:
  chant release publish 0.124.34: npm (24 packages) to npm the registry npm's config names
Dry run: nothing was cut, signed or tagged.
Dry run: nothing cut, tagged or pushed.

The origin's refs were unchanged afterwards. release-pack.sh 0.124.34 in this worktree packed all 24 packages in about 2 minutes. Every tarball was at 0.124.34 with ^0.124.34 ranges (for example helm depends on @intentius/chant-lexicon-k8s ^0.124.34), and the tree was clean after. A cut against the scratch origin, followed by chant release publish 0.124.34 without --yes, listed all 24 packages to dist-tag latest.

Tests: publish-targets.test.ts has a new stage: false case, and scripts/release-member.test.ts (new) checks that the list covers every publishable package once, core first, each after its workspace dependencies. All scripts/ tests and the publish and release-publish suites pass (268). The docs prose and citation lints pass.

Follow-up commit 3e0f4a7:

  • The npm target gains tokenEnv. When a package's publish fails to authenticate (ENEEDAUTH, E401), it publishes again with that variable's token from a temporary npm user config. If the registry then refuses the attestation, it publishes once more without --provenance. This is publish-packages.sh's per-package fallback (publish_one). release/chant.config.ts sets tokenEnv: "NPM_TOKEN", and release-publish passes the secret. Packages whose record works never use the token.
  • just release-lexicon sets its floor with release_lexicon_floor (scripts/release-lib.sh): the highest of package.json at the commit and on main, the lexicon-<name>-v* tags, the release/npm/* tags and npm view <pkg> version. A package npm has never seen (E404) adds nothing to the floor. Any other npm view failure refuses rather than guess. A dry run of just release-lexicon aws patch --dry-run against the real remote printed 0.124.33 → 0.124.34, one past npm.
  • Tests: two tokenEnv cases in publish-targets.test.ts: the retry, the second retry without provenance, the token never printed, and no retry when the variable is unset or the failure isn't authentication. A new scripts/release-lexicon-floor.test.ts covers npm highest, a release tag highest, E404 and a failed lookup. The publish unit suites (33), the publish-targets e2e (2) and the release script tests (37) pass. Two unit tests went over the 5-second budget under load and pass with the budget off.

The first real publish over this path is what's left to watch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant