Skip to content

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

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

afonsojramos wants to merge 6 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, linking, and testing the Vite+ (vp) tool.
    • Added architecture-specific downloads with checksum verification.
    • Added version synchronization for Vite+, Vite, Vitest, and coverage tooling.
  • Documentation

    • Documented Vite+ release archives and checksum locations for supported Linux architectures.
  • Tests

    • Added integration and container coverage for Vite+ installation and version synchronization.
    • Added validation for supported architectures, checksums, downloads, linking, and version checks.

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 Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 82b9d3d3-73bb-4fd0-a258-d73974ef538b

📥 Commits

Reviewing files that changed from the base of the PR and between b808d01 and 80a118d.

📒 Files selected for processing (6)
  • .dockerignore
  • package.json
  • test/Dockerfile.distro
  • test/node/Dockerfile
  • test/node/Dockerfile.arm64
  • test/node/vp/sync-versions.mjs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Vite+ (vp) installation support, release checksum validation, linking, version testing, container registration, documentation, Renovate rules, and standard and arm64 integration tests.

Changes

Vite+ support

Layer / File(s) Summary
Vite+ release installation
src/cli/tools/node/vp.ts
Adds architecture-specific release naming, checksum parsing, version availability checks, archive installation, linking, and vp --version testing.
Tool registration and update policy
src/cli/install-tool/index.ts, src/cli/tools/index.ts, docs/custom-registries.md, .github/renovate.json
Registers VpInstallService, marks vp as a no-prepare tool, documents release assets, and adds vp to test dependency update rules.
Service behavior tests
src/cli/tools/node/vp.spec.ts
Tests asset naming, checksum parsing, installation, unavailable versions, linking, and version testing.
Sync-versions image validation
test/Dockerfile.distro, test/node/Dockerfile, test/node/Dockerfile.arm64, test/node/vp/sync-versions.mjs, package.json, .dockerignore
Adds pinned Vite+ Docker stages, bundles the sync-versions test, includes the bundle in Docker builds, and runs asynchronous synchronization, idempotence, configuration-isolation, and cleanup checks.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant install-tool
  participant VpInstallService
  participant HttpService
  participant CompressionService
  install-tool->>VpInstallService: Install vp version
  VpInstallService->>HttpService: Check and download release metadata
  VpInstallService->>HttpService: Download checksum-verified archive
  VpInstallService->>CompressionService: Extract archive into versioned bin directory
  VpInstallService->>install-tool: Link and test vp
Loading
🚥 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. (5 skipped: 5 … 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 vp.
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. (5 skipped: 5 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
"bats": "node tools/bats.js --timing --verbose-run",
"build": "run-s 'build:*'",
"build:cli": "node tools/build.js",
"build:test": "rolldown test/node/vp/sync-versions.mjs --platform node --format esm --file dist/test/vp-sync-versions.mjs",

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.

why rolldown? our node version should be new enough to allow esm with top-level await by default

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Apologies, had this locally for testing. Have undone the change

Comment thread test/node/Dockerfile
ARG VP_VERSION=0.3.1
RUN install-tool vp "${VP_VERSION}"

COPY dist/test/vp-sync-versions.mjs /test/vp-sync-versions.mjs

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Bug: Docker COPY targets unbuilt dist/test/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');
  • Apply fix

Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎

@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

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