fix(release): pin squad-sdk to the exact published version in publish-cli - #1638
Merged
tamirdresher merged 1 commit intoAug 8, 2026
Conversation
…-cli Fixes bradygaster#1588 packages/squad-cli/package.json declares "@bradygaster/squad-sdk": ">=0.11.0", a floor with no ceiling. Pinning a CLI version therefore doesn't pin the SDK that ships with it — the next SDK publish silently changes the presets, charters, and runtime behavior every consumer pinned to that CLI version gets, with no version bump visible anywhere. Added a step to the publish-cli job in squad-npm-publish.yml that rewrites the SDK dependency to an exact pin (the same version being published, since squad-version-promote.yml always bumps SDK and CLI together) right before build/publish. Source keeps the >=0.11.0 floor unchanged so npm workspaces still resolves the in-repo SDK locally — only the published package.json gets the exact pin. No changeset: this only touches .github/workflows/, which the repo's own changelog-gate regex excludes from the changeset requirement. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🟢 Impact Analysis — PR #1638Risk tier: 🟢 LOW 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (1 file)
This report is generated automatically for every PR. See #733 for details. |
Contributor
🏗️ Architectural Review
Automated architectural review — informational only. |
Contributor
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ❌ | CI passing | 8 check(s) still running |
Files Changed (1 file, +17 −0)
| File | +/− |
|---|---|
.github/workflows/squad-npm-publish.yml |
+17 −0 |
Total: +17 −0
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
tamirdresher
approved these changes
Aug 8, 2026
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.
What
squad-npm-publish.yml'spublish-clijob now rewrites the publishedpackages/squad-cli/package.json's@bradygaster/squad-sdkdependency to an exact version pin, right before build/publish.Why
Closes #1588
packages/squad-cli/package.jsondeclares"@bradygaster/squad-sdk": ">=0.11.0"— a floor, no ceiling. Pinning a CLI version (npx @bradygaster/squad-cli@0.11.0) doesn't pin the SDK it installs, since*/>=both float to whatever's latest on the registry at install time. The SDK carries the presets and agent charters, so the first0.12.0SDK publish silently changes behavior for every consumer pinned tosquad-cli@0.11.0, with no version bump visible anywhere and no way to roll back by pinning. That's exactly the failure mode CI version pinning (e.g. the gh-aw shared component'sSQUAD_CLI_VERSION) exists to prevent.Went with the fix the issue itself suggested: pin exact at publish time, keep the floor range in source. Skipped the
workspace:*idea also mentioned in the issue — npm doesn't support that protocol (it's pnpm/yarn syntax), committing it would makenpm installtry to fetch a package literally namedworkspace:*and fail. This repo already handles workspace resolution the normal npm-workspaces way (rootworkspaces: ["packages/*"]), which doesn't care what semver range is declared as long as the local version satisfies it — so leaving the floor range in source doesn't need to change for local dev to keep working.How
.github/workflows/squad-npm-publish.yml: new stepPin squad-sdk dependency to the exact published version (#1588)in thepublish-clijob, between the existing#1203resolvability check and the SDK build step. Rewritespackages/squad-cli/package.json's SDK dependency tosteps.version.outputs.version— the same version string already used by every other step in this job (Determine version,Verify package version matches target), and the same valuepublish-sdkjust published and verified is live on the registry (this jobneeds: [..., publish-sdk]). Follows the exact samenode -e "... '$VAR' ..."bash-into-node interpolation stylesquad-version-promote.ymlalready uses for its own package.json rewrites, rather than inventing a new convention.Testing
packages/squad-cli/package.json(real run, not hypothetical):actionlint/shellcheckavailable locally on this Windows box — this repo'sWorkflow Lintjob runs both against.github/workflows/**on every PR that touches it, so CI is the real check here.git diffvsgit diff -widentical, no whitespace-only hunks. File has no CRLF (plain LF), untouched by that concern..github/workflows/squad-npm-publish.yml. The repo's own changelog-gate regex (SDK_CLI_PATH_REGEXinsquad-ci.yml) is scoped topackages/squad-*/src|templates,.squad-templates/,templates/, and agent charters —.github/workflows/isn't in it, andPR_REQUIREMENTS.mdlists "Infrastructure (CI, GitHub Actions, workflows)" under "What Is NOT User-Facing". Structural exemption, not a waiver.PR Readiness Checklist
Branch & Commit
devdevBuild & Test
Workflow LintCI job.Changeset
Docs
Exports
Breaking Changes
None. Published CLI package.json content changes (exact pin instead of a floor range) but the semver range this replaces already permitted that exact version — nothing that installs today stops resolving.
Waivers
None.