From 692fd438421342227f81fb239f6833dbdeaec959 Mon Sep 17 00:00:00 2001 From: Brent Rager Date: Sun, 12 Jul 2026 22:59:46 -0400 Subject: [PATCH] fix(release): sync-versions step 3 skips operator-core git dep The version PR broke on 'failed to select a version for smooai-smooth-operator-core = ^0.18.0': sync-versions.mjs step 3 (add missing version) stamped the workspace version onto the smooth-operator git dep, which the pinned rev can't provide. Step 2 already skipped it; step 3 now does too. This is the durable fix for the release-blocking issue (the release branch was also patched directly to unblock the current release). Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01Vg7frHqHSAUXhQiRNdr3NW --- .changeset/fix-sync-versions-operator-core.md | 5 +++++ scripts/sync-versions.mjs | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-sync-versions-operator-core.md diff --git a/.changeset/fix-sync-versions-operator-core.md b/.changeset/fix-sync-versions-operator-core.md new file mode 100644 index 000000000..0a38d09e5 --- /dev/null +++ b/.changeset/fix-sync-versions-operator-core.md @@ -0,0 +1,5 @@ +--- +"@smooai/smooth": patch +--- + +fix(release): `sync-versions.mjs` no longer stamps a `version` onto the external `smooth-operator` git dependency. Step 2 skipped `smooai-smooth-operator-core`, but the step-3 "add missing version" branch didn't — so each release injected `version = ""` onto the git dep, which the pinned rev can't satisfy (`failed to select a version for smooai-smooth-operator-core = ^X.Y.Z`), blocking the Changesets version PR's Rust checks. Step 3 now applies the same skip. Pearl th-1ee32b. diff --git a/scripts/sync-versions.mjs b/scripts/sync-versions.mjs index 02607e2b2..853a39018 100644 --- a/scripts/sync-versions.mjs +++ b/scripts/sync-versions.mjs @@ -70,11 +70,24 @@ const updates = [ // 3. Add version to any smooth-X workspace dep that doesn't have // one yet. Match "smooth-X = { path = "crates/smooth-X", ... }" // and splice `version = "X.Y.Z",` in right after the opening brace. + // + // SAME EXCEPTION AS STEP 2: skip the EXTERNAL operator-core git + // dep (`smooth-operator = { git, rev, package = + // "smooai-smooth-operator-core" }`). It carries no version on + // `main`, so this add-branch would otherwise stamp the workspace + // version onto it — pointing at an operator-core release that + // doesn't exist at the pinned rev and breaking `cargo` resolution + // on the version PR (`failed to select a version for + // smooai-smooth-operator-core = ^X.Y.Z`). Step 2 skipped it but + // step 3 forgot to. Pearl th-1ee32b. const addVersionPattern = /^(smooth-[a-z-]+\s*=\s*\{)(?!([^}\n]*\bversion\b))([^}\n]*)(\})/gm; next = next.replace( addVersionPattern, - (_, pre, _v, body, close) => { + (match, pre, _v, body, close) => { + if (match.includes("smooai-smooth-operator-core")) { + return match; + } const trimmed = body.trimStart(); const separator = trimmed.length > 0 ? " " : ""; return `${pre} version = "${version}",${separator}${trimmed}${close}`;