Skip to content

fix(release): sync Cargo crate version with npm/GitHub release version - #63

Merged
ryanleecode merged 1 commit into
masterfrom
fix/version-sync-cargo-npm
Aug 25, 2026
Merged

fix(release): sync Cargo crate version with npm/GitHub release version#63
ryanleecode merged 1 commit into
masterfrom
fix/version-sync-cargo-npm

Conversation

@systemfsoftware-maker

Copy link
Copy Markdown
Collaborator

Problem

comment-checker --version reports 0.1.0 while npm and GitHub releases are at 0.1.7.

Cargo.toml [workspace.package] version and crates/comment-checker/Cargo.toml have never been bumped — release-version.ts only bumped npm/packages/comment-checker/package.json, so every cargo build in platform.yml embeds the stale 0.1.0 and tag-released-packages.ts tags it as v0.1.7.

Fix

  • Bump Cargo.toml and crates/comment-checker/Cargo.toml to 0.1.7 (drift repair)
  • Make release-version.ts bump all crates/*/Cargo.toml alongside npm so future releases stay locked — comment-checker --version will match the GitHub tag
  • Add scripts/tools/check-versions.ts and wire into tools.yml to fail PRs on Cargo-vs-npm divergence

Verification

  • cargo run -- --version0.1.7 (was 0.1.0)
  • ./scripts/tools/check-versions.tsok npm=0.1.7 workspace=0.1.7
  • Divergence probe: temp bump Cargo to 0.1.8check-versions exits 1 with Cargo.toml workspace 0.1.8 != npm 0.1.7
  • release-version.ts probe: fake .changeset/probe.md (patch) → Cargo + npm both 0.1.8
  • cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test --all-targets green

Plan: docs/plans/2026-08-25-002-fix-version-sync-cargo-npm.md

Fixes: self-reported version mismatch with GitHub release.

Binary --version reported 0.1.0 while npm and GitHub releases were at
0.1.7. release-version.ts only bumped package.json, never Cargo.toml,
so every publish built a binary stamped with the stale workspace
version.

- Bump Cargo.toml and crates/comment-checker/Cargo.toml to 0.1.7
- Make release-version.ts bump all crates/*/Cargo.toml alongside npm
- Add check-versions.ts gate and wire into tools.yml to fail PRs on
  Cargo-vs-npm divergence

Co-authored-by: internal-model
@ryanleecode
ryanleecode merged commit 1d3bb8b into master Aug 25, 2026
11 checks passed
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.

2 participants