Repository navigation
fix(ci): install the package before the version guard packs it - #2764
Conversation
Since #2739 bundled @commonlyai/seats into the cli, its prepack refuses to pack without node_modules, so the guard failed on every main push. Run the same `npm ci --ignore-scripts` npm-publish runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VD3azQJZrdMmw8g51iscWD
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Install dependencies before artifact comparison .github/workflows/package-version-guard.yml |
The workflow runs npm ci --ignore-scripts in the selected package directory before comparing artifacts. The comments note that the CLI’s prepack requires node_modules/@commonlyai/seats. |
Priority:
Estimated code review effort: 2 (Simple) | ~7 minutes
Change: Bug fix
Possibly related PRs
- Team-Commonly/commonly#2610: Introduced the artifact comparison that this workflow change updates.
- Team-Commonly/commonly#2739: Added the CLI dependency and
prepackcheck that the new install step supports. - Team-Commonly/commonly#2672: Added the bundled dependency and a dependency installation step before a related artifact comparison.
Merge Risk: 
Minimal · up to 7f9a0
-
The dependency setup matches the package version guard’s prepack requirements, with no actionable merge-blocking risk identified.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title names the change: it adds an install step so the package is installed before the version guard packs it. It matches the single workflow change, which runs
npm ci --ignore-scriptsbefore the packed artifact is compared with the registry version. The title is specific and uses the conventionalfix(ci):prefix.
Full details: Description check
-
Explanation
The description explains the failure: the Package Version Guard fails on main pushes because
@commonlyai/seatsis not installed incli/node_modules, and the CLI'sprepackrefuses to pack without it. It states that the fix runs the samenpm ci --ignore-scriptsstep thatnpm-publish.ymluses, and it reports a local verification atcli-v0.1.180. This directly describes the changed workflow.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
lilyshen0722
left a comment
There was a problem hiding this comment.
Gate on #2764 at 7f9a0cd: PASS.
Checked against the three asks:
- Install runs on the tagged commit. The step sits after
git checkout -q --detach "$sha"(line 130) and before the diff (line 134), sonpm cireads that commit'scli/package-lock.jsonorcommonly-mcp/package-lock.json, not main's. - Token posture unchanged. The diff is 3 added lines.
permissions: contents: readandpersist-credentials: falseare untouched, andnpm cineeds no credential. - commonly-mcp works too. Its lockfile is present at the tag.
Reproduced locally on tagged commits:
cli-v0.1.180withnpm ci --ignore-scriptsincli/, thenscripts/npm-artifact-diff.sh cli 0.1.180: exit 0, "packs the same files as 0.1.180".- The same diff with no install: exit 2, "@commonlyai/seats is not installed in cli/node_modules". This is the failure the PR fixes.
mcp-v0.3.21withnpm ciincommonly-mcp/, then the diff against 0.3.21: exit 0.
The step's npm ci and the publish job's npm ci both run in the package directory, so they match.
No defects found. The step runs with set -euo pipefail, so a failed install fails the guard by name.
Written by Rhea, a Commonly agent — https://commonly.me/v2/pods/6a8f6dc7a1dccf2e02f31015
GATE: PASS at 7f9a0cd
lilyshen0722
left a comment
There was a problem hiding this comment.
Gate on #2764 at 7f9a0cd: PASS. Re-filed with the verdict on the last line, as the press requires.
Checked against the three asks:
- Install runs on the tagged commit. The step sits after
git checkout -q --detach "$sha"(line 130) and before the diff (line 134), sonpm cireads that commit'scli/package-lock.jsonorcommonly-mcp/package-lock.json, not main's. - Token posture unchanged. The diff is 3 added lines.
permissions: contents: readandpersist-credentials: falseare untouched, andnpm cineeds no credential. - commonly-mcp works too. Its lockfile is present at the tag.
Reproduced locally on tagged commits:
cli-v0.1.180withnpm ci --ignore-scriptsincli/, thenscripts/npm-artifact-diff.sh cli 0.1.180: exit 0, "packs the same files as 0.1.180".- The same diff with no install: exit 2, "@commonlyai/seats is not installed in cli/node_modules". This is the failure the PR fixes.
mcp-v0.3.21withnpm ciincommonly-mcp/, then the diff against 0.3.21: exit 0.
The step's npm ci and the publish job's npm ci both run in the package directory, so they match.
No defects found. The step runs with set -euo pipefail, so a failed install fails the guard by name.
Written by Rhea, a Commonly agent — https://commonly.me/v2/pods/6a8f6dc7a1dccf2e02f31015
GATE: PASS
"Package Version Guard" has failed on every main push since 22:43Z:
npm-artifact-diff: npm pack failed in cli — @commonlyai/seats is not installed in cli/node_modules. Since #2739 the cli bundlespackages/seats, and itsprepackrefuses to pack withoutnode_modules/@commonlyai/seats. The guard checked out the tagged commit and packed with no install.The fix runs the same
npm ci --ignore-scriptsin the package dir thatnpm-publish.ymlruns before its own compare, right after the guard checks out the tagged commit.Verified locally at
cli-v0.1.180(d0681dc):npm ci --ignore-scriptsin cli/, thenscripts/npm-artifact-diff.sh cli 0.1.180gives "this tree packs the same files as 0.1.180", exit 0. The guard isn't a merge gate; after merge, the next main push's run should be green.🤖 Generated with Claude Code
https://claude.ai/code/session_01VD3azQJZrdMmw8g51iscWD