Skip to content

fix: avoid npx when applying profile changes#1351

Open
showms wants to merge 1 commit into
Fission-AI:mainfrom
showms:codex/fix-config-profile-npx
Open

fix: avoid npx when applying profile changes#1351
showms wants to merge 1 commit into
Fission-AI:mainfrom
showms:codex/fix-config-profile-npx

Conversation

@showms

@showms showms commented Jul 12, 2026

Copy link
Copy Markdown

Summary

Fixes the interactive openspec config profile apply step by invoking openspec update directly instead of routing through npx.

Closes #1304 #1306 .

Problem

After saving profile or workflow changes, the config wizard prompts:

Apply changes to this project now?

When confirmed, it currently runs:

npx openspec update

This unnecessarily depends on npm/npx and may fail when:

  • OpenSpec is installed with Bun or as a standalone binary
  • The current project uses pnpm or another package manager
  • npm fails while inspecting the project's dependency tree

The openspec executable is already available on PATH, so invoking it through npx is unnecessary.

Changes

  • Replace npx openspec update with openspec update
  • Update the config profile test expectation

Verification

  • test/commands/config-profile.test.ts: 19 tests passed
  • node build.js: passed
  • git diff --check: passed

Summary by CodeRabbit

  • Bug Fixes
    • Improved the project profile update workflow by using the installed OpenSpec command directly when applying configuration changes.

@showms showms requested a review from TabishB as a code owner July 12, 2026 08:52
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fae94af2-333f-4261-a288-bc7f119bdbec

📥 Commits

Reviewing files that changed from the base of the PR and between 0a99f41 and 2625ca7.

📒 Files selected for processing (2)
  • src/commands/config.ts
  • test/commands/config-profile.test.ts

📝 Walkthrough

Walkthrough

The config profile apply flow now executes openspec update directly instead of invoking it through npx, with the test expectation updated accordingly.

Changes

Config apply command

Layer / File(s) Summary
Direct update invocation
src/commands/config.ts, test/commands/config-profile.test.ts
The apply-now flow runs openspec update with the existing working directory and inherited stdio settings, and the test expects the updated command.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related issues

  • Issue 1306: The change directly implements the proposed replacement of npx openspec update with openspec update in the config apply flow.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: replacing npx with a direct openspec call during profile apply.
Linked Issues check ✅ Passed The code change matches issue #1304 by invoking openspec update directly and updating the related test expectation.
Out of Scope Changes check ✅ Passed The PR stays narrowly scoped to the apply command and its test, with no unrelated changes visible.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config wizard 'apply now' fails on bun/standalone installs — hardcoded npx openspec update

1 participant