fix: OpenSpec CLI install scope#179
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesOpenSpec Global Install Fix
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideOpenSpec CLI installation is refactored to always use global npm install regardless of Comet skill scope, a regression test is added to assert the global install behavior for project scope, and the installOpenSpec wiring is updated accordingly. Sequence diagram for global OpenSpec CLI installation regardless of scopesequenceDiagram
participant CometInit
participant installOpenSpec
participant ensureOpenSpecCli
participant npm as npm_execFileSync
CometInit->>installOpenSpec: installOpenSpec(scope, projectPath, shouldInstallCli)
installOpenSpec->>ensureOpenSpecCli: ensureOpenSpecCli(projectPath, shouldInstallCli)
ensureOpenSpecCli->>npm: execFileSync(getNpmExecutable(), [install, -g, @fission-ai/openspec@latest])
npm-->>ensureOpenSpecCli: CLI installed_or_upgraded
ensureOpenSpecCli-->>installOpenSpec: 'ready' | 'missing' | 'failed'
installOpenSpec-->>CometInit: 'installed' | 'failed' | 'skipped'
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Around line 11-14: Remove the entire `### Tests` changelog entry from
CHANGELOG.md, since the new OpenSpec install regression coverage is a normal
unit/regression test and should not be documented there. Keep the changelog
focused on user-runnable release capabilities only; no other content in this
section should remain.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5f46e235-ad71-47a3-8951-a3683517fa6d
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
CHANGELOG.mddomains/integrations/openspec.tspackage.jsontest/domains/integrations/openspec.test.ts
|
|
@coderabbitai |
|
✅ Action performedReview finished.
|
|
LGTM |
Summary
comet initis run with project scope.openspec initbehavior so OpenSpec skills/artifacts still initialize under the selected Comet scope.0.4.0-beta.4and add a changelog entry.Root Cause
Project-scope initialization reused Comet's install scope for the OpenSpec CLI npm install command. That made Comet run
npm install @fission-ai/openspec@latestfrom the target project directory, which is npm's local install mode and can create a projectnode_modules/directory. The CLI is later resolved from PATH and executed asopenspec, so the CLI install should be global regardless of Comet's project/global skill scope.Fixes #175.
Validation
npx vitest run test/domains/integrations/openspec.test.ts test/app/init.test.tspnpm lintpnpm buildgit diff --checkNotes
A full local
pnpm testrun was also attempted: 1047 tests passed and 1 existing environment-sensitive doctor auto-scope assertion failed because this machine has global Comet skills installed. The failure is unrelated to this OpenSpec install-scope change.Summary by Sourcery
Ensure the OpenSpec CLI is always installed globally, regardless of Comet project/global skill scope, to avoid creating project-local node_modules directories.
Bug Fixes:
Tests:
Summary by CodeRabbit