From 0d6dd82c6a23b5bdab728dc4f4b8ae1730edf8b8 Mon Sep 17 00:00:00 2001 From: Brent Rager Date: Sat, 25 Jul 2026 13:12:58 -0400 Subject: [PATCH] fix(release): sync-versions skips operator crates in Cargo.lock pass too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #260 stopped stamping the operator git deps in Cargo.toml, but the Cargo.lock pass still bumped smooai-smooth-operator-server/-svc lock entries to the workspace version (0.23.0). Their git source at rev 9db9d319 is 1.23.1, so cargo --locked failed to resolve — the version PR (#222) stayed red on a different line. Skip all three external operator package names by exact match in the lock pass, mirroring the Cargo.toml git-dep skip. Pearl th-1ee32b. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01KTQCKSkMFSE1j6QwD29BGL --- .changeset/fix-sync-versions-lock-git-deps.md | 5 +++++ scripts/sync-versions.mjs | 22 ++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 .changeset/fix-sync-versions-lock-git-deps.md diff --git a/.changeset/fix-sync-versions-lock-git-deps.md b/.changeset/fix-sync-versions-lock-git-deps.md new file mode 100644 index 00000000..63411b49 --- /dev/null +++ b/.changeset/fix-sync-versions-lock-git-deps.md @@ -0,0 +1,5 @@ +--- +"@smooai/smooth": patch +--- + +fix(release): `sync-versions.mjs` Cargo.lock pass now also skips the external operator crates. #260 fixed the Cargo.toml git-dep stamping, but the Cargo.lock block still bumped `smooai-smooth-operator-server` / `smooai-smooth-operator` (svc) lock entries to the workspace version (0.23.0), while their git source only offers 1.23.1 — so `cargo --locked` failed (`= "*" locked to 0.23.0 … candidate 1.23.1`), still red-lighting the version PR. Skip all three external operator package names (core/server/svc) by exact name in the lock pass. Pearl th-1ee32b. diff --git a/scripts/sync-versions.mjs b/scripts/sync-versions.mjs index 6c28f5d6..4ee610f3 100644 --- a/scripts/sync-versions.mjs +++ b/scripts/sync-versions.mjs @@ -114,17 +114,23 @@ const updates = [ // 933b927). The old regex matched `smooth-*` only and silently // missed every crate. // - // EXCEPTION: `smooai-smooth-operator-core` is the EXTERNAL engine - // crate (published from its own repo); its locked version must - // track its real crates.io release, NOT the workspace version. - // Bumping its lock entry to a workspace version that was never - // published breaks `cargo` resolution ("locked to 0.14.1 … - // candidate 0.14.0"). Skip it — same root cause as the Cargo.toml - // dep skip above. Pearl th-1ee32b. + // EXCEPTION: the EXTERNAL operator crates published from the + // smooth-operator repo — their locked versions track that repo, NOT + // the workspace version. Bumping a lock entry to a workspace version + // that source never published breaks `cargo` resolution under + // `--locked` ("= "*" locked to 0.23.0 … candidate 1.23.1"). Three + // package names, matched exactly: + // - `smooai-smooth-operator-core` (crates.io engine) + // - `smooai-smooth-operator-server` (git dep) + // - `smooai-smooth-operator` (git dep, the svc crate) + // The Cargo.toml dep skip (above) keys on `git =`, but lock entries + // carry `source` on a separate line outside this 2-line match, so + // here we skip by exact name. Pearl th-1ee32b (the lock twin the + // git-dep Cargo.toml fix in #260 left behind). const pattern = /(name = "smooai-smooth-[^"]+"\nversion = ")([^"]+)(")/g; return content.replace(pattern, (match, pre, _ver, post) => { - if (pre.includes("smooai-smooth-operator-core")) { + if (/name = "smooai-smooth-operator(-core|-server)?"\n/.test(pre)) { return match; } return `${pre}${version}${post}`;