Skip to content

fix: allow Pro greenfield validation without package manifest - #733

Merged
rafaelscosta merged 1 commit into
mainfrom
fix/pro-greenfield-validation
May 13, 2026
Merged

fix: allow Pro greenfield validation without package manifest#733
rafaelscosta merged 1 commit into
mainfrom
fix/pro-greenfield-validation

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Summary\n- Treat greenfield installs that intentionally skipped package.json as valid even when Pro creates node_modules\n- Skip package manifest and security audit checks in that specific no-package.json greenfield path\n- Bump @aiox-squads/core/aiox-core to 5.2.3 and @aiox-squads/installer to 3.3.3 for publication\n\n## Validation\n- npm test -- tests/installer/pro-setup-auth.test.js tests/unit/wizard/validation/dependency-validator.test.js --runInBand\n- npm run lint -- --no-cache packages/installer/src/wizard/validation/validators/dependency-validator.js tests/unit/wizard/validation/dependency-validator.test.js\n- npm run validate:publish\n- Local guided Pro install with real account: Pro activated, 2538 files installed, Overall Status: All checks passed\n

Summary by CodeRabbit

  • Bug Fixes

    • Improved installer validation to properly handle new projects without existing package configuration files, enabling successful setup without validation errors.
  • Chores

    • Updated package versions across core packages.
  • Tests

    • Added test coverage for greenfield project validation scenarios without package configuration.

Review Change Stack

@vercel

vercel Bot commented May 13, 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 13, 2026 5:09pm

Request Review

@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown

Walkthrough

This PR bumps package versions across the monorepo (core wrapper to 5.2.3, core to 5.2.3, installer to 3.3.3) and updates installer validation to detect and handle greenfield projects that have node_modules but no package.json. When detected, package manifest and security audit checks are skipped while required dependencies are still validated.

Changes

Greenfield validation feature and release

Layer / File(s) Summary
Package manifest version updates
compat/aiox-core/package.json, package.json, packages/installer/package.json
Core wrapper, main package, and installer versions incremented for release.
Greenfield scenario detection
packages/installer/src/wizard/validation/validators/dependency-validator.js
Validator detects "no package.json" greenfield scenario via depsContext.skipped/reason flags and file existence; dependency-existence check respects this computed state.
Greenfield validation execution and test
packages/installer/src/wizard/validation/validators/dependency-validator.js, tests/unit/wizard/validation/dependency-validator.test.js
Validation conditionally skips package manifest and security audit checks for greenfield projects while still running required dependency checks; new test verifies successful validation, correct check statuses/messages, and that security audit command is not executed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • SynkraAI/aiox-core#730: The wrapper package version and dependency bump in compat/aiox-core/package.json connects directly to the legacy aiox-core wrapper introduced in that PR.

Suggested labels

area: installer, area: core, type: test

Suggested reviewers

  • Pedrovaleriolopez
  • oalanicolas
🚥 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: fixing greenfield validation to allow Pro installs without a package manifest, which directly corresponds to the core logic changes in the dependency validator.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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-greenfield-validation

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 added type: test Test coverage and quality area: installer Installer and setup (packages/installer/) area: docs Documentation (docs/) labels May 13, 2026
@github-actions

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 coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/installer/src/wizard/validation/validators/dependency-validator.js (1)

15-24: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Document the new depsContext properties.

The JSDoc parameter documentation for depsContext should include the skipped and reason properties that are now part of the function contract (used at lines 51-52).

📝 Proposed JSDoc enhancement
 /**
  * Validate dependencies
  *
  * `@param` {Object} depsContext - Dependency installation context
  * `@param` {boolean} depsContext.success - Installation success status
  * `@param` {string} depsContext.packageManager - Package manager used
  * `@param` {boolean} depsContext.offlineMode - Offline mode flag
  * `@param` {string} depsContext.projectType - Project type (GREENFIELD, BROWNFIELD, etc.)
+ * `@param` {boolean} [depsContext.skipped] - Whether dependency installation was skipped
+ * `@param` {string} [depsContext.reason] - Reason for skipping (e.g., 'no-package-json')
  * `@returns` {Promise<Object>} Validation result
  */
🤖 Prompt for 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.

In `@packages/installer/src/wizard/validation/validators/dependency-validator.js`
around lines 15 - 24, The JSDoc for the validate dependencies function needs to
document the newly used properties on depsContext: add `@param` lines for
depsContext.skipped (boolean) and depsContext.reason (string) to the existing
JSDoc block so callers/readers know those fields are part of the contract;
update the block that currently documents depsContext.success, packageManager,
offlineMode, and projectType to also list skipped and reason and a short
description for each, referencing the same depsContext identifier used by the
function.
🤖 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.

Outside diff comments:
In `@packages/installer/src/wizard/validation/validators/dependency-validator.js`:
- Around line 15-24: The JSDoc for the validate dependencies function needs to
document the newly used properties on depsContext: add `@param` lines for
depsContext.skipped (boolean) and depsContext.reason (string) to the existing
JSDoc block so callers/readers know those fields are part of the contract;
update the block that currently documents depsContext.success, packageManager,
offlineMode, and projectType to also list skipped and reason and a short
description for each, referencing the same depsContext identifier used by the
function.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3abd96c6-1bfb-49c0-b3a4-b8bfea593176

📥 Commits

Reviewing files that changed from the base of the PR and between d3ea190 and a54b595.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • compat/aiox-core/package.json
  • package.json
  • packages/installer/package.json
  • packages/installer/src/wizard/validation/validators/dependency-validator.js
  • tests/unit/wizard/validation/dependency-validator.test.js

@rafaelscosta
rafaelscosta merged commit e5b7cf5 into main May 13, 2026
41 checks passed
@rafaelscosta
rafaelscosta deleted the fix/pro-greenfield-validation branch May 13, 2026 17:14
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