Skip to content

feat(tools): install Vite+ releases - #7338

Open
afonsojramos wants to merge 11 commits into
containerbase:mainfrom
afonsojramos:feat/vite-plus-tool
Open

afonsojramos wants to merge 11 commits into
containerbase:mainfrom
afonsojramos:feat/vite-plus-tool

Conversation

@afonsojramos

@afonsojramos afonsojramos commented Sep 2, 2026 •

Copy link
Copy Markdown

Summary

Containerbase can install an exact Vite+ release as vp, giving downstream tools a verified way to run the compatibility planner owned by that release.

This is the second part of the Vite+ dependency-alignment integration. The planner from voidzero-dev/vite-plus#2600 is now available in Vite+ 0.3.1. The downstream Renovate integration is in renovatebot/renovate#45630.

Design

  • Installation selects the official archive for the current Linux architecture and validates it against vp-checksums.txt.
  • The extracted vp, planner sidecar, and toolchain manifest retain the release layout expected by the global CLI.
  • Vite+ declares Node as its parent tool so the JavaScript planner always has a compatible runtime.
  • Releases that predate the planner contract return a stable marker. Renovate can treat that case as unsupported instead of as a failed update.

Validation

  • All 141 Vitest tests passed, including the 8 Vite+ installer tests.
  • Formatting, ESLint, both TypeScript configurations, Markdown lint, and git diff --check passed.
  • The CLI build passed. Both Node Docker test images (linux/amd64 and linux/arm64) installed Vite+ 0.3.1 and ran the bundled sync-versions --json planner as a non-root user.
  • The planner smoke test checks dependency alignment, repeat execution, and unchanged project files. A deliberately wrong expected version failed as expected.

Summary by CodeRabbit

  • New Features

    • Added support for installing and using Vite+ (vp), including architecture-specific downloads, checksum verification, linking, and version checks.
    • Added vp to the Node.js integration test environments.
  • Documentation

    • Documented Vite+ release downloads and checksum files.
  • Tests

    • Added coverage for Vite+ installation, linking, version checks, and sync-version behavior.

fengmk2 added a commit to voidzero-dev/vite-plus that referenced this pull request Sep 4, 2026
## Summary

Vite+ releases can now tell external automation how to align Vite+,
Vite+ core, Vitest, and official Vitest packages without reading or
changing the project itself. This provides the release-owned
compatibility contract needed to prevent dependency bots from producing
mixed toolchains.

This is the first part of a three-repository integration. Containerbase
installation and Renovate reconciliation follow after this contract
ships in a Vite+ release.

## Design

- `vp sync-versions --json` accepts bounded manifest snapshots over
stdin and returns deterministic before/after replacements.
- Planning updates only existing managed declarations. It preserves
catalog protocols, JSON formatting, and YAML comments, quoting,
indentation, and line endings.
- The command does not load project configuration, run installs or
lifecycle scripts, format source, or write to the repository.
- Both the npm CLI and standalone archive expose the same protocol.
Release archives include the self-contained planner, toolchain manifest,
and checksums needed for verified installation.

## Validation

- Planner, protocol, package-override, and migration suites: 395 tests
passed.
- Focused sync-version suites: 39 tests passed.
- Global CLI Rust suite: 486 tests passed, 2 ignored.
- CLI TypeScript build, optimized Rust build, npm entrypoint smoke test,
and standalone archive-layout simulation passed.
- Scoped formatting, lint, type checks, and `git diff --check` passed.

Related: #2356

Downstream drafts:

- containerbase/base#7338
- renovatebot/renovate#45630

---------

Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
@afonsojramos

afonsojramos commented Sep 5, 2026 •

Copy link
Copy Markdown
Author

Upstream update: voidzero-dev/vite-plus#2600 has merged. This draft is now waiting for a Vite+ release containing vp sync-versions --json and the corresponding release artifacts.

Once that ships, I'll validate install-tool vp <version> against the published archive and checksums before marking this ready. The Renovate integration is in renovatebot/renovate#45630.

Exercise Vite+ 0.3.1 installation and dependency alignment on both Linux
architectures and in the distro test matrix. Check repeat execution and
verify that project manifests and configuration remain unchanged.
@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: adbd3017-2f9c-4af2-8c7a-c7491b202362

📥 Commits

Reviewing files that changed from the base of the PR and between 0eb2445 and c9bdbe5.

⛔ Files ignored due to path filters (1)
  • test/node/vp/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .github/renovate.json
  • docs/custom-registries.md
  • test/Dockerfile.distro
  • test/node/Dockerfile
  • test/node/Dockerfile.arm64
  • test/node/vp/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/custom-registries.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Vite+ (vp) as an installable tool. It downloads and verifies release archives, registers the tool with the CLI, documents its release assets, and adds unit and container-based validation.

Changes

Vite+ support

Layer / File(s) Summary
Release installation
src/cli/tools/node/vp.ts
VpInstallService selects architecture-specific release assets, parses SHA-256 checksums, downloads and extracts archives, links the installed binary with Node environment support, and runs vp --version.
CLI registration and release documentation
src/cli/install-tool/index.ts, src/cli/tools/index.ts, docs/custom-registries.md
The install container registers VpInstallService. The tool is listed as requiring no prepare step. The registry documentation lists Vite+ release URLs.
Installer behavior tests
src/cli/tools/node/vp.spec.ts
Tests cover asset naming, checksum parsing, installation, unavailable release metadata, linking, and version testing.
Container sync-versions validation
test/Dockerfile.distro, test/node/Dockerfile*, test/node/vp/*, .github/renovate.json
Docker test stages install Vite+ and run the sync-versions test. The test project adds execa and uses asynchronous operations. Renovate enables updates for its package and includes vp in test dependency rules.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant VpInstallService
  participant HttpService
  participant CompressionService
  VpInstallService->>HttpService: Check and download checksum manifest
  VpInstallService->>HttpService: Download release archive
  VpInstallService->>CompressionService: Extract archive into versioned bin directory
Loading

Merge Risk: ⚪ Minimal · up to c9bdb

The installer’s supported architectures and release layout match its expectations, and both container test stages include the required lockfile and script. No concrete merge-blocking issue was identified.

Architecture Summary

Architecture risk: 🔵 Low · up to c9bdb

The change affects 3 systems.

Changed systems: test, src, docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — test (service) was modified; 5 changed files map to changed impact.
  • observed — src (service) was modified; 4 changed files map to changed impact.
  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/cli/tools/index.ts: Added the 'vp' entry to the exported NoPrepareTools array, which also flows into NoInitTools since it spreads NoPrepareTools.
  • observed — Modified behavior in src/cli/install-tool/index.ts: Adds the import for VpInstallService from ../tools/node/vp.ts.
  • observed — Modified behavior in src/cli/install-tool/index.ts: Registers VpInstallService with the INSTALL_TOOL_TOKEN binding in prepareInstallContainer, alongside the other tool install services.
  • observed — Modified behavior in src/cli/tools/node/vp.spec.ts: Adds tests for vitePlusAssetName mapping amd64/arm64 to release asset names, and for parseVitePlusChecksum selecting the checksum for the exact requested asset from a multi-line checksum file.
🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 8 files. (6 skipped: 6 … 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 clearly and concisely describes the main change: adding support to install Vite+ releases as the vp tool.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 8 files. (6 skipped: 6 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@afonsojramos
afonsojramos marked this pull request as ready for review September 12, 2026 23:08
Comment thread docs/custom-registries.md Outdated
Comment thread test/latest/Dockerfile
Comment thread src/cli/tools/node/vp.ts
Comment thread test/Dockerfile.distro Outdated
Group Vite+ with its Node parent and keep planner smoke tests in the
Node images. Use released download examples and assert the actual
version-check command.
@afonsojramos

Copy link
Copy Markdown
Author

@viceice, can you take another look? Thanks 🙏

Comment thread test/node/vp/sync-versions.mjs Outdated
Comment thread test/Dockerfile.distro Outdated
Address review feedback on containerbase#7338 with promises and execa. Bundle the
fixture with the existing locked dependencies for both Node test images,
and simplify the distro check to a direct versioned install.
@afonsojramos

Copy link
Copy Markdown
Author

@viceice Thanks for the review and clarification! The distro checks are installation-only and now use the simpler versioned install you suggested. The functional checks remain in the Node images.

Comment thread package.json Outdated
Comment thread test/node/Dockerfile Outdated
@gitar-bot

gitar-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown
Code Review ⚠️ Changes requested 0 closed / 1 findings

🟡 Medium risk · Adds architecture-specific executable downloads, checksum validation, and planner integration.

Adds Vite+ installer support with architecture-specific downloads and checksum validation, but the Docker build cannot proceed: the COPY commands in both Node Dockerfiles reference dist/test/vp-sync-versions.mjs, which the build pipeline does not generate. Add a build step to emit this file or update the COPY directives to use the actual source path at test/node/vp/sync-versions.mjs.

⚠️ Bug: Docker COPY targets unbuilt dist/test/vp-sync-versions.mjs

📄 test/node/Dockerfile:589 📄 test/node/Dockerfile.arm64:88 📄 .dockerignore:5 📄 test/node/vp/sync-versions.mjs

Both node Dockerfiles run COPY dist/test/vp-sync-versions.mjs /test/vp-sync-versions.mjs, and .dockerignore was updated to un-ignore dist/test, but the planner script lives at test/node/vp/sync-versions.mjs. The build pipeline (tools/build.js) only populates dist/docker, dist/app, dist/package.json and dist/cli; no step copies/renames test/node/vp/sync-versions.mjs to dist/test/vp-sync-versions.mjs. Unless such a copy step is added, the COPY layer fails with "file not found" and the test-vp stage cannot build. Add a build step that emits dist/test/vp-sync-versions.mjs (or point the COPY at the actual source path).

Emit the planner script to dist/test during build so the Docker COPY resolves.
# in tools/build.js, add after the docker copy step:
shell.mkdir('-p', 'dist/test');
shell.cp('test/node/vp/sync-versions.mjs', 'dist/test/vp-sync-versions.mjs');
🤖 Prompt for agents
Code Review: Adds Vite+ installer support with architecture-specific downloads and checksum validation, but the Docker build cannot proceed: the `COPY` commands in both Node Dockerfiles reference `dist/test/vp-sync-versions.mjs`, which the build pipeline does not generate. Add a build step to emit this file or update the `COPY` directives to use the actual source path at `test/node/vp/sync-versions.mjs`.

1. ⚠️ Bug: Docker COPY targets unbuilt dist/test/vp-sync-versions.mjs
   Files: test/node/Dockerfile:589, test/node/Dockerfile.arm64:88, .dockerignore:5, test/node/vp/sync-versions.mjs

   Both node Dockerfiles run `COPY dist/test/vp-sync-versions.mjs /test/vp-sync-versions.mjs`, and `.dockerignore` was updated to un-ignore `dist/test`, but the planner script lives at `test/node/vp/sync-versions.mjs`. The build pipeline (`tools/build.js`) only populates `dist/docker`, `dist/app`, `dist/package.json` and `dist/cli`; no step copies/renames `test/node/vp/sync-versions.mjs` to `dist/test/vp-sync-versions.mjs`. Unless such a copy step is added, the `COPY` layer fails with "file not found" and the `test-vp` stage cannot build. Add a build step that emits `dist/test/vp-sync-versions.mjs` (or point the COPY at the actual source path).

   Fix (Emit the planner script to dist/test during build so the Docker COPY resolves.):
   # in tools/build.js, add after the docker copy step:
   shell.mkdir('-p', 'dist/test');
   shell.cp('test/node/vp/sync-versions.mjs', 'dist/test/vp-sync-versions.mjs');

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 3 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

Copy the source fixture into both Node images and install its locked execa
dependency with npm ci. Keep fixture dependency updates enabled in Renovate
without restoring the removed bundling step.

Update the installer test pins and sample release URLs to Vite+ 1.0.0.
@afonsojramos

Copy link
Copy Markdown
Author

@viceice Fixed the Docker test setup that gitar-bot pointed out. It now runs the source directly and installs execa from a dedicated lockfile, without bundling. Also bumped Vite+ to 1.0.0 and enabled Renovate updates for the test dependencies.

@viceice viceice left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sorry for the churn

Comment thread .github/renovate.json Outdated
Comment thread test/node/vp/sync-versions.mjs Outdated
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.

2 participants