Repository navigation
Migrate babylon's workspace ranges for vlt in an untimed setup step - #225
Merged
Merged
Conversation
Since #213 every tool installs babylon's manifests as committed: plain semver sibling ranges, which vlt 1.8.0 rewrites to `workspace:*` on its first install. A vlt user's repo stays migrated after that install, so in every variation but `clean`, vlt's --prepare now runs `migrate_workspace_protocol` (clean-helpers.sh) before its first install of a set: `vlt install --lockfile-only --view=silent`, which rewrites the manifests with no node_modules and no tarballs; the lockfile it writes is discarded, or a pre-existing one is restored byte for byte. Later prepares find `workspace:` present and do nothing; clean_all undoes it between tools. `clean` sets BENCH_SETUP_VLT empty, so the migration stays part of the timed first install there. If --lockfile-only fails, the helper warns and vlt's first install migrates as before. METHODOLOGY documents where the migration happens and that it does not make vlt's first warm babylon run like the later ones: vltpkg/vltpkg#2155 (optional `canvas` written to the lockfile but not installed on a first install) means vlt installs 1,601 packages instead of 1,618 in the no-lockfile variations, which slightly flatters vlt, and the first install from a lockfile downloads those 17. No workaround in the suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit details
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. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Since #213 every tool gets
babylon's manifests as committed: 86 workspace packages with plain semver sibling ranges. vlt 1.8.0 rewrites 257 of the 323 sibling ranges toworkspace:*on its first install. A vlt user's repo stays migrated after that install (the rewritten manifests get committed), so in the warm variations vlt should start from already-migrated manifests, and incleanthe migration should stay part of the timed first install.suite/scripts/clean-helpers.sh: newmigrate_workspace_protocol(the inverse ofclean_workspace_protocol), plus itscaseentry and help line. No-op withoutvlt, withoutpackages/, or once any manifest already has"workspace:(agrep, ~8 ms). Otherwise it runsvlt install --lockfile-only --view=silent, which rewrites the manifests exactly as a full install does (80package.jsonfiles, plus 36 unrelated"bugs"rewrites, a vlt quirk) with nonode_modulesand no tarballs (~17 s cold). The lockfile it writes is discarded, or a pre-existingvlt-lock.jsonis put back byte for byte. If--lockfile-onlyfails (e.g. registry/token trouble in CI) it warns and returns 0, and vlt's first install migrates as part of its timed run, as today.variations/common.sh:BENCH_SETUP_VLT="bash $BENCH_SCRIPTS/clean-helpers.sh migrate_workspace_protocol". That is appended to vlt's--prepareonly (append_setup,set_per_pm_prepares,ci_prepare,ci_setup_prepare,prepend_setupin build/run, andadd-remove-state.sh's baseline), never to hyperfine's shared--setup.variations/clean.sh:BENCH_SETUP_VLT=""right after sourcing common.sh, beforecollect_process_countreads it, so the process-count pass matches the timed runs.registry-*use npm as the client and don't readBENCH_SETUP_VLT.docs/METHODOLOGY.md: the babylon paragraph now says where the migration happens, and what it doesn't fix (below).What this does not fix
The migration does not make vlt's first warm run on babylon identical to later ones. That comes from vltpkg/vltpkg#2155: on a first install without a lockfile, vlt writes the optional dependency
canvas(17 packages with its tree) to the lockfile but doesn't install it; the next install, from that lockfile, does. So:clean,cache,node_modulesand their combinations without a lockfile) vlt installs 1,601 packages where its own lockfile and the other tools have 1,618. That slightly flatters vlt until #2155 is fixed;No workaround in the suite: forcing
canvasin would make vlt behave unlike vlt. The existing #2154 note (sibling resolution flips in installs without a lockfile) stays; it is independent of the migration.Per-variation effect
cleancache,node_modules,cache+node_modulesgrepno-oplockfile,cache+lockfile,lockfile+node_modules,cache+lockfile+node_modulesgrepno-opci,ci+setupBENCH_CLEAN_PRE, before the untimed lockfile-generating installgrepno-op (the untimed install runs every prepare regardless)add-*,remove-*build,run,build-cachepackages/: no-opregistry-*clean_all(--setup/--cleanup, and between tools) restores the manifests withclean_workspace_protocol, so the next tool starts from the project as committed.Verified
node --test suite/scripts/: 46 pass, including four newmigrate_workspace_protocoltests with a fakevltonPATH(manifest rewritten and lockfile gone; pre-existing lockfile kept byte-identical; no-op withoutpackages/; no-op when"workspace:is present, includingworkspace:specs inside a workspace'snode_modules, which don't count).babylon, vlt only (BENCH_INCLUDE=vlt BENCH_WARMUP=1 BENCH_RUNS=2), throughscripts/benchmark.shwith the fixture'svlt.jsonpointed atregistry.npmjs.org(not committed), in a sandbox with a fresh tmpfsHOME. A loggingvltwrapper recorded every vlt call with the fixture state (ws_specs=workspace:*count):cache+lockfile:install --lockfile-onlyruns once right after--setup(ws_specs 0 -> 257, no lockfile left), then the warmup install creates the lockfile, then both timed runs start from it with the prepare a no-op. The process-count pass repeats that once for its own set. Timed runs 6.5 s / 6.3 s; the warmup from migrated manifests 10 s.clean: zero--lockfile-onlycalls; every install starts atws_specs=0, 21 s each.git statusshows the manifests restored, and novlt-lock.json,node_modulesor.bench-vlt-lock.jsonleft behind. All exit codes 0 (hyperfine, both variations, and both scripts).clean1,601;cache+lockfilemin 1,601 (first install, no lockfile) / max 1,618 (from the lockfile).🤖 Generated with Claude Code