Repository navigation
Conversation
|
Warning Review limit reached
Next review available in: 23 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughFetch now uses a virtual-store-only configuration and avoids importer links. Global Virtual Store installs propagate ChangesFetch and GVS recovery
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR Summary by QodoFinish Global Virtual Store recovery and make fetch virtual-store-only
AI Description
Diagram
High-Level Assessment
Files changed (13)
|
Micro-Benchmark ResultsLinux |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Confidence Score: 5/5Safe to merge — the changes are well-scoped, guarded at every error path, and covered by integration tests that exercise the marker write, detect, re-import, removal, and side-effects exclusion cycle end-to-end. The No files require special attention. Reviews (4): Last reviewed commit: "fix: keep GVS marker source on store fil..." | Re-trigger Greptile |
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
pnpm/crates/package-manager/src/install.rs (2)
1546-1553: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winReorder cheap
rebuild.is_none()before the FS-probing checks.
rebuild.is_none()is a plain field check, yet it sits aftergvs_build_marker_present(...)(aread_dir-based scan) and beforefrozen_tree_intact(...)(another FS probe). Since the comment on the next line states an explicit rebuild "never short-circuits here" regardless of markers, movingrebuild.is_none()earlier in the&&chain lets apacquet rebuildskip both FS probes entirely.♻️ Suggested reordering
&& !has_newly_allowed_ignored_builds(modules, config) && !has_revoked_allowed_builds(modules, config) - // A build marker lives in the shared slot, outside every - // project-state input checked above. Let materialization inspect - // buildable and patched GVS slots instead of declaring the local - // tree complete from importer links alone. - && !gvs_build_marker_present(wanted_lockfile, config) - // An explicit `pacquet rebuild` always re-runs the build phase, - // so it never short-circuits here. - && rebuild.is_none() + // An explicit `pacquet rebuild` always re-runs the build phase, + // so it never short-circuits here. + && rebuild.is_none() + // A build marker lives in the shared slot, outside every + // project-state input checked above. Let materialization inspect + // buildable and patched GVS slots instead of declaring the local + // tree complete from importer links alone. + && !gvs_build_marker_present(wanted_lockfile, config) && frozen_tree_intact(wanted_lockfile, modules, config, &workspace_root, node_linker)🤖 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 `@pnpm/crates/package-manager/src/install.rs` around lines 1546 - 1553, Reorder the condition in the surrounding install-state check so rebuild.is_none() is evaluated before gvs_build_marker_present(...) and frozen_tree_intact(...). Preserve the existing behavior that an explicit rebuild bypasses the short-circuit, while ensuring it avoids both filesystem-probing checks.
2763-2843: 🚀 Performance & Scalability | 🔵 Trivial | 🏗️ Heavy lift
gvs_build_marker_presentcan run twice per install for the same answer. When the optimistic fast path findsmarker_safe == false(i.e. a marker is actually present), execution falls through and can later re-enter the frozen "no-op" check, which calls the sameread_dir-based scan against the same wanted lockfile again. With a broadallowBuilds/dangerouslyAllowAllBuildsconfig (exactly the scenario REVIEW_GUIDE.md's performance-second guidance warns about), this doubles an already lockfile-wide FS scan.
pnpm/crates/package-manager/src/install.rs#L2763-L2843: introduce a small cache (e.g. compute lazily once into aCell<Option<bool>>/OnceCell<bool>scoped torun_inner) so the second caller reuses the first result instead of re-walking the store.pnpm/crates/package-manager/src/install.rs#L947-L955: on first need, compute and stash the marker-presence result in the shared cache instead of only using it locally.pnpm/crates/package-manager/src/install.rs#L1546-L1550: read from the shared cache here instead of callinggvs_build_marker_presenta second time.🤖 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 `@pnpm/crates/package-manager/src/install.rs` around lines 2763 - 2843, Cache the result of gvs_build_marker_present once per run_inner invocation, using a shared lazy Cell/OnceCell, and reuse it at both call sites. In pnpm/crates/package-manager/src/install.rs:947-955, compute and store the result on first use; in pnpm/crates/package-manager/src/install.rs:1546-1550, read the cached value instead of rescanning; update gvs_build_marker_present at pnpm/crates/package-manager/src/install.rs:2763-2843 only as needed to support this cache.Source: Path instructions
🤖 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.
Inline comments:
In @.changeset/calm-spiders-rebuild.md:
- Around line 1-5: Update the changeset frontmatter to include both the existing
"pacquet" patch entry and a "pnpm" patch entry, reflecting the user-visible
parity changes described in the summary.
In `@pnpm/crates/package-manager/src/create_virtual_store.rs`:
- Around line 296-305: Gate creation and writing of needs_build_marker_source on
both global virtual store being enabled and config.frozen_store being false.
Update the logic around needs_build_marker_source in create_virtual_store so
frozen-store + GVS installs avoid all writes under the read-only store root
while preserving marker creation for writable GVS installs; add a regression
test in global_virtual_store.rs for a frozen-store GVS install with no build
required.
---
Nitpick comments:
In `@pnpm/crates/package-manager/src/install.rs`:
- Around line 1546-1553: Reorder the condition in the surrounding install-state
check so rebuild.is_none() is evaluated before gvs_build_marker_present(...) and
frozen_tree_intact(...). Preserve the existing behavior that an explicit rebuild
bypasses the short-circuit, while ensuring it avoids both filesystem-probing
checks.
- Around line 2763-2843: Cache the result of gvs_build_marker_present once per
run_inner invocation, using a shared lazy Cell/OnceCell, and reuse it at both
call sites. In pnpm/crates/package-manager/src/install.rs:947-955, compute and
store the result on first use; in
pnpm/crates/package-manager/src/install.rs:1546-1550, read the cached value
instead of rescanning; update gvs_build_marker_present at
pnpm/crates/package-manager/src/install.rs:2763-2843 only as needed to support
this cache.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 33c4ae71-cc9d-41cd-b1a3-dbdca6bd61d4
📒 Files selected for processing (13)
.changeset/calm-spiders-rebuild.mdpnpm/crates/cli/src/cli_args/fetch.rspnpm/crates/cli/tests/fetch.rspnpm/crates/cli/tests/global_virtual_store.rspnpm/crates/package-manager/src/build_modules.rspnpm/crates/package-manager/src/create_virtual_dir_by_snapshot.rspnpm/crates/package-manager/src/create_virtual_dir_by_snapshot/tests.rspnpm/crates/package-manager/src/create_virtual_store.rspnpm/crates/package-manager/src/import_indexed_dir.rspnpm/crates/package-manager/src/install.rspnpm/crates/package-manager/src/install_package_by_snapshot.rspnpm/crates/package-manager/src/lib.rspnpm/plans/TEST_PORTING.md
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit eb41848 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Completes the remaining Global virtual store work tracked in #13167 for pacquet:
.pnpm-needs-buildinto buildable GVS slots, detects interrupted slots across warm and no-op install paths, reimports them, and removes the marker before side-effects uploadpnpm fetchuse virtual-store-only materialization, including the global virtual store, without creating importer linksRelated to #13167.
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Codex, gpt-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
.pnpm-needs-buildmarkers.Behavior Changes
pnpm fetchnow populates the (global) virtual store in virtual-store-only mode without creating top-level importer links.Tests / Documentation