fix(linker): expose hidden hoist from global store#358
Conversation
Greptile SummaryThis PR fixes GVS installs where packages resolved via the canonical Confidence Score: 5/5Safe to merge; only P2 findings present, all relating to test coverage gaps rather than correctness defects in the new logic. No new P0 or P1 issues found. The two P2 comments are about test coverage gaps (untested @scope/ live-link preservation path, and a cross-project hoist=false test that only exercises a single project). The implementation logic in sweep_dead_hidden_hoist_entries, sweep_dead_hidden_hoist_scope, and link_hidden_hoist_at is correct on inspection. The issues flagged in prior review rounds are known trade-offs documented in the PR and code comments. No files require special attention beyond the test coverage gaps noted inline. Important Files Changed
Reviews (5): Last reviewed commit: "fix(linker): mirror hidden hoist into gl..." | Re-trigger Greptile |
e09c89c to
7b1c24f
Compare
|
Addressed the shared-store race in The project-local hidden hoist still does the wipe-and-repopulate because that directory is owned by one project. The shared GVS hidden hoist now runs additively: it preserves the existing Added Validation:
|
7b1c24f to
700e81c
Compare
|
Addressed the follow-up feedback in Changes:
Added coverage:
Validation:
This comment was generated by Codex. |
700e81c to
17ce225
Compare
|
Addressed the cross-project removal issue in The GVS hidden-hoist cleanup no longer uses the current project's graph as the complete preserve set. Instead, the shared I also updated the PR body to call out the upstream angle: packages with undeclared imports should ideally fix their manifests, but aube still needs GVS to match its existing hidden-hoist compatibility behavior for the ecosystem that already relies on hoisting. Validation:
This comment was generated by Codex. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 17ce225. Configure here.
17ce225 to
9f4f334
Compare
|
Addressed the latest cleanup feedback in
Validation run locally:
This comment was generated by Codex. |

Summary
~/.cache/aube/virtual-store/...paths can still resolve hoisted packages..aube/node_modulesbehavior unchanged for non-canonicalized paths.Root Cause
Some toolchains resolve package files through their real GVS path instead of the project-local
.aube/<dep_path>symlink. From that real path, Node's upwardnode_moduleswalk cannot reachnode_modules/.aube/node_modules, so packages that rely on hidden hoisting for undeclared imports fail. The reported@ngx-translate/core/rxjsfailure is one instance of that shape.Tradeoffs
Packages with undeclared imports should fix their manifests upstream. This PR does not add package-specific exceptions; it makes GVS preserve the same hidden-hoist compatibility behavior that aube already provides in the project-local virtual store.
Because the GVS hidden hoist is shared across projects, cleanup is intentionally conservative. Live links are preserved even when they are not in the current project graph; a current install only removes dead targets or junk entries before reconciling the names it owns.
Validation
cargo fmt --checkcargo test -p aube-linker test_global_virtual_store_hidden_hoist -- --nocapturecargo test -p aube-linkercargo clippy -p aube-linker --all-targets -- -D warningsgit diff --checkNote
Medium Risk
Changes filesystem linking/cleanup behavior for hidden-hoist entries in global-virtual-store mode; mistakes could break module resolution or delete shared links across projects.
Overview
Fixes hidden-hoist resolution in global virtual store (GVS) mode by mirroring the hidden-hoist symlinks into
virtual_store/node_modules/in addition to the existing project-local.aube/node_modules/, so canonicalized package paths can still resolve hoisted undeclared deps.Refactors hidden-hoist linking into
link_hidden_hoist_atand adds shared-safe cleanup viasweep_dead_hidden_hoist_entries, which only removes dangling links/non-link junk in the shared GVS directory (while project-local installs still fully wipe/rebuild). Adds regression tests covering GVS hidden-hoist creation, dead-entry pruning, and preservation of live shared links when hoist is disabled.Reviewed by Cursor Bugbot for commit 9f4f334. Bugbot is set up for automated code reviews on this repo. Configure here.