fix(release): guard publish dist-tags and matrices - #666
Merged
IvGolovach merged 1 commit intoJun 5, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
3 issues found across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
IvGolovach
force-pushed
the
codex/release-publish-safety-20260601
branch
from
June 1, 2026 22:58
5600a47 to
82e6941
Compare
Validation
* Validation tier: Tier 4 - CI/release tooling; touched publish workflow, native-build workflow, npm publish helper, launcher smoke helper, and release workflow safety checks.
* git diff --check origin/main...HEAD: PASS.
* git diff --check: PASS.
* git diff --cached --check: PASS.
* bash scripts/test-calculate-release-version.sh && bash scripts/test-check-version-coherence.sh && bash scripts/test-npm-release-state.sh && bash scripts/test-prepare-release-provenance.sh && bash scripts/test-release-workflow-safety.sh: PASS.
* bash scripts/test-package-launchers.sh: PASS.
* python3 scripts/check-release-workflow-safety.py: PASS.
* python3 -m py_compile scripts/check-release-workflow-safety.py: PASS.
* bash -n scripts/check-version-coherence.sh scripts/test-check-version-coherence.sh scripts/check-npm-release-state.sh scripts/test-npm-release-state.sh scripts/publish-npm-package.sh scripts/test-package-launchers.sh scripts/test-release-workflow-safety.sh scripts/calculate-release-version.sh scripts/test-calculate-release-version.sh scripts/prepare-release-provenance.sh scripts/test-prepare-release-provenance.sh: PASS.
* ruby -e 'require "yaml"; ARGV.each { |path| YAML.load_file(path); puts "#{path}: OK" }' .github/workflows/publish-cli.yml .github/workflows/build-native.yml: PASS.
* Version: PASS, bash scripts/check-version-coherence.sh.
* Ledger: not applicable - not required for selected validation tier/change family.
* Not run: full workspace cargo test - not required for selected validation tier because runtime Rust code was not changed and targeted release/workflow validation covers the touched tooling.
Rollback
* git revert HEAD
IvGolovach
force-pushed
the
codex/release-publish-safety-20260601
branch
from
June 5, 2026 03:44
82e6941 to
b030c90
Compare
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.
Summary
latest.Why
Tokscale publishes platform packages and wrapper packages directly to npm from a manual release workflow. Small drift between the test-only native build matrix, the publish build matrix, and the platform publish matrix can produce release-only failures that are hard to see in normal PR checks. The same is true for npm dist-tags: a prerelease should not be able to land on
latestby accident. This PR adds deterministic local and CI checks for those release invariants before a release publish can proceed.Diff scope
.github/workflows/publish-cli.yml: adds top-level release build environment parity, runs the release safety checker, and avoids unsupported ARM Linux strip commands in the publish matrix..github/workflows/build-native.yml: runs the same release safety checker during native-build PR validation.scripts/check-release-workflow-safety.py: validates workflow env parity, build matrix parity, package directory mapping, artifact names, binary names, and platform package manifest names.scripts/publish-npm-package.sh: derives npm dist-tags from semver prerelease identifiers and refuses prerelease publishes withlatest.scripts/test-release-workflow-safety.sh: covers accepted and rejected workflow drift cases.scripts/test-npm-release-state.sh: covers stable and prerelease npm dist-tag behavior.scripts/test-package-launchers.sh: supports debug smoke builds, verifies installed wrapper/package paths, and checks stale PATH fallback failure behavior.Branch integrity
maina86e688d620939d2c973c6d5625baa815ea223d7origin/main:0 behind / 1 aheada86e688d620939d2c973c6d5625baa815ea223d7Commit integrity
5600a47776f7184d4c0db51ba59e2b716cb70928 fix(release): guard publish dist-tags and matricesDiff hygiene
git diff --name-status origin/main...HEAD:M .github/workflows/build-native.yml,M .github/workflows/publish-cli.yml,A scripts/check-release-workflow-safety.py,M scripts/publish-npm-package.sh,M scripts/test-npm-release-state.sh,M scripts/test-package-launchers.sh,A scripts/test-release-workflow-safety.shgit diff --check origin/main...HEAD: PASS, no outputValidation mode and proof
python3 scripts/check-release-workflow-safety.py: PASSbash scripts/test-release-workflow-safety.sh: PASSbash scripts/test-npm-release-state.sh: PASSTOKSCALE_SMOKE_BUILD_PROFILE=debug bash scripts/test-package-launchers.sh: PASSbash -n scripts/*.sh: PASSpython3 -m py_compile scripts/check-release-workflow-safety.py: PASSruby -e 'require "yaml"; YAML.load_file(".github/workflows/publish-cli.yml"); YAML.load_file(".github/workflows/build-native.yml"); puts "YAML parse OK"': PASSgit diff --check origin/main...HEAD: PASS, no outputactionlint: not run - not installed in this local environment.CI context confirmation
Runtime safety
Not applicable - no CLI runtime session parsing, frontend runtime, database, auth, or server API path changed.
Release safety
latestonly for stable versions and derives prerelease dist-tags such asbetafor versions like3.1.0-beta.1.latest.tokscaleonPATH.Migration notes
Not applicable - no DB migration changed.
Documentation integrity
Not applicable - no docs or runbooks changed. This PR enforces existing release expectations through scripts and workflow checks.
Rollback plan
Rollback: revert this PR.
DB downgrade: not applicable.
Data repair: not applicable.
Operational caveats: reverting removes the new release safety checks and restores the previous npm publish dist-tag behavior.
Known residual risks
actionlintproof is unavailable becauseactionlintis not installed in this environment; workflow YAML was parsed locally and the release safety checker exercises the changed matrix invariants.Summary by cubic
Adds a release safety checker to keep native-build and publish matrices/env in sync, and prevents prerelease versions from publishing with the
latestnpm tag. Expands tests, aligns publish env with native build, and removes unsupported ARM Linux strip commands.New Features
scripts/check-release-workflow-safety.pyand runs it in build-native and publish workflows to enforce env/matrix/artifact/binary/package parity.scripts/publish-npm-package.shto derive npm dist-tags from semver (stable ->latest, prerelease -> first identifier likebeta) and reject prerelease publishes withlatest.NPM_DIST_TAG); launcher smokes add debug/release profiles, verify installed wrapper/CLI/platform paths, and assert PATH fallback failures.Bug Fixes
Written for commit b030c90. Summary will update on new commits.