Skip to content

fix(installer): use npm cli for Pro artifact install under npx#778

Merged
rafaelscosta merged 1 commit into
mainfrom
fix/pro-artifact-npx-npm-invocation
May 21, 2026
Merged

fix(installer): use npm cli for Pro artifact install under npx#778
rafaelscosta merged 1 commit into
mainfrom
fix/pro-artifact-npx-npm-invocation

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix Pro artifact extraction when the installer is launched through npx -p @aiox-squads/core aiox install
  • Derive sibling npm-cli.js when npm_execpath points to npx-cli.js
  • Bump @aiox-squads/core to 5.2.9 and @aiox-squads/installer to 3.3.8

Root Cause

In Linux/npm flows, npm_execpath can point at npx-cli.js. The installer trusted that value as npm and effectively ran node npx-cli.js install <pro-artifact.tgz> --prefix <target>, which dispatches to an install package/binary and fails with unexpected argument --prefix found.

Verification

  • npx jest tests/installer/pro-setup-auth.test.js tests/installer/pro-setup-target-install.test.js --runInBand --forceExit
  • npm run validate:publish
  • npm run lint
  • npm run test:ci
  • git diff --check

User Check

jpvalente72@gmail.com is not blocked by seats: license has 2/3 active seats and 1 available.

Summary by CodeRabbit

  • Bug Fixes

    • Fix Pro artifact installation when invoked via npx by ensuring the installer uses the appropriate npm executable for reliable extraction.
  • Chores

    • Version bump to 5.2.9 across packages.
    • Installer dependency updated to 3.3.8.
    • Manifest metadata refreshed.
  • Tests

    • Added tests covering npm executable resolution behavior.
  • Documentation

    • Added CHANGELOG entry for 5.2.9 (2026-05-21).

Review Change Stack

@vercel

vercel Bot commented May 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aiox-core Ready Ready Preview, Comment May 21, 2026 1:46am

Request Review

@github-actions github-actions Bot added type: test Test coverage and quality area: installer Installer and setup (packages/installer/) area: docs Documentation (docs/) labels May 21, 2026
@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

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: 9685aa0b-98fe-4fd3-8463-4b554c7ffb14

📥 Commits

Reviewing files that changed from the base of the PR and between 441b090 and fd40047.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • .aiox-core/install-manifest.yaml
  • .aiox-core/package.json
  • CHANGELOG.md
  • compat/aiox-core/package.json
  • package.json
  • packages/installer/package.json
  • packages/installer/src/wizard/pro-setup.js
  • tests/installer/pro-setup-auth.test.js
✅ Files skipped from review due to trivial changes (5)
  • .aiox-core/package.json
  • .aiox-core/install-manifest.yaml
  • packages/installer/package.json
  • CHANGELOG.md
  • tests/installer/pro-setup-auth.test.js

Walkthrough

Version 5.2.9 release that fixes Pro artifact installation when invoked via npx by resolving the npm executable path from npm_execpath (mapping npx-cli.js to npm-cli.js when available), with synchronized version and manifest bumps and added tests.

Changes

Npm path resolution fix and test coverage

Layer / File(s) Summary
Npm path resolution logic
packages/installer/src/wizard/pro-setup.js, tests/installer/pro-setup-auth.test.js
Added resolveNpmExecPath to interpret npm_execpath, mapping npx-cli.js to adjacent npm-cli.js (with Windows path handling); updated resolveNpmInvocation to use the resolved cli path via prefixArgs when present. Added two tests verifying mapping and fallback to npm.

Version and manifest synchronization

Layer / File(s) Summary
Package version updates across monorepo
package.json, .aiox-core/package.json, compat/aiox-core/package.json, packages/installer/package.json
Bumped package versions to 5.2.9 (root, .aiox-core, compat wrapper) and packages/installer to 3.3.8; updated compat wrapper dependency on @aiox-squads/core to 5.2.9.
Manifest and changelog updates
.aiox-core/install-manifest.yaml, CHANGELOG.md
Updated install manifest version and generated_at, changed recorded sha256 for monitor/hooks/user_prompt_submit.py, and added a 5.2.9 changelog entry documenting the npx/npm invocation behavior and installer bump.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • SynkraAI/aiox-core#735: Updates npm invocation logic in packages/installer/src/wizard/pro-setup.js and adds test coverage for resolveNpmInvocation resolution strategy.

Suggested reviewers

  • oalanicolas
  • Pedrovaleriolopez
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: fixing npm CLI resolution for Pro artifact installation when invoked via npx, which is the core objective of this changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pro-artifact-npx-npm-invocation

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 and usage tips.

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Coverage report not available

📈 Full coverage report available in Codecov


Generated by PR Automation (Story 6.1)

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 21, 2026
@rafaelscosta rafaelscosta merged commit d23248f into main May 21, 2026
50 checks passed
@rafaelscosta rafaelscosta deleted the fix/pro-artifact-npx-npm-invocation branch May 21, 2026 01:52
tuanmedeiros pushed a commit to tuanmedeiros/aios-core-synkraay that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation (docs/) area: installer Installer and setup (packages/installer/) type: test Test coverage and quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant