fix(cli): honor AUBE_VIRTUAL_STORE_DIR env var + port 5 more pnpm/misc tests#456
fix(cli): honor AUBE_VIRTUAL_STORE_DIR env var + port 5 more pnpm/misc tests#456
Conversation
`resolve_virtual_store_dir` only checked `npm_config_virtual_store_dir` and `NPM_CONFIG_VIRTUAL_STORE_DIR` for the explicit-override gate, even though settings.toml declares `AUBE_VIRTUAL_STORE_DIR` alongside both. Setting only the AUBE_-prefixed variant silently fell through to the default `node_modules/.aube`, contradicting the documented setting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Brings test/pnpm_install_misc.bats to 27/36 ported + 9 documented divergences/already-equivalent. New ports: --no-lockfile (63), recursive bare add (254), virtual-store-dir relocation (405), CI mode auto-frozen drift (427), CI env-var override (457). Skipped with documentation in test/PNPM_TEST_IMPORT.md: - 271/287 already covered by test/engines.bats - 136 (package.yaml manifest, aube reads JSON only) - 303 (engines.pnpm, aube checks engines.node only) - 337/371 (workspace per-project engines, aube checks root only) - 479 (updateConfig pnpmfile hook, not implemented) - 567 (git URL with hash, no git resolver) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR fixes a silent bug in Confidence Score: 5/5Safe to merge — fix is minimal, well-scoped, and fully covered by new unit and integration tests. The core fix is a one-liner addition to a detection predicate with no broader behavioral surface, all existing tests pass, and the regression is explicitly guarded by both a unit test and an end-to-end bats test. No security, logic, or compatibility concerns were found. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "test: port 5 more pnpm install/misc.ts c..." | Re-trigger Greptile |
Benchmark changesPublic ratios: warm installs vs Bun 5x -> 9x; warm installs vs pnpm 6x -> 12x.
a3ba2f6 vs 8bd5012 | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex. |
Summary
resolve_virtual_store_dironly checkednpm_config_virtual_store_dirandNPM_CONFIG_VIRTUAL_STORE_DIR, even thoughsettings.tomldeclaresAUBE_VIRTUAL_STORE_DIRas a third alias. Setting only the AUBE_-prefixed variant silently fell through to the defaultnode_modules/.aube. Now all three env-var aliases trigger the explicit-override path.test/pnpm_install_misc.batsto 27/36 ported (was 22/37 — corrected count; pnpm has 36test()calls, not 37). Adds 5 new ports + 6 documented divergences + 2 already-equivalent.New ports
--no-lockfileAUBE_LOCKFILE=falseenv (no CLI flag in aube)pnpm -r addbareaube -r addreuses single-project validator--virtual-store-dirAUBE_VIRTUAL_STORE_DIRenv (now works thanks to the fix above)CI=1+ drifted manifest → frozen-mode hard-fail;--no-frozen-lockfilebypassesAUBE_PREFER_FROZEN_LOCKFILE=falsemaps toFrozenMode::NoDocumented divergences (
test/PNPM_TEST_IMPORT.md)136package.yaml manifest — aube reads JSON only303engines.pnpm— aube checksengines.nodeonly337/371workspace per-projectengines.node— aube checks root manifest only479updateConfigpnpmfile hook — aube supportsreadPackage/afterAllResolved/preResolutiononly567git URL with#branch/with-slash— aube has no git resolverAlready-equivalent
271/287root engine-strict warn/fail — covered bytest/engines.bats:12,32Test plan
crates/aube/src/commands/mod.rs(resolve_virtual_store_dir_tests)test/pnpm_install_misc.batspasscargo test --bin aubepasscargo clippy --all-targets -- -D warningscleancargo fmt --checkclean🤖 Generated with Claude Code
Note
Medium Risk
Changes how the install/linker chooses the
virtualStoreDirwhen only environment variables are set, which can affect on-disk layout and downstream commands that read the virtual store path. Risk is mitigated by added unit and integration tests covering default and override cases.Overview
Fixes
resolve_virtual_store_dirto treatAUBE_VIRTUAL_STORE_DIRas an explicit override (alongside thenpm_config_*aliases), so setting only the aube-prefixed env var no longer falls back to the defaultnode_modules/.aube.Adds regression unit tests for virtual-store resolution and ports five additional
pnpm/test/install/misc.tscases intotest/pnpm_install_misc.bats(env-based no-lockfile, recursive bareaddvalidation, virtual-store relocation, CI frozen-lockfile drift behavior, and CI env-var override). UpdatesPNPM_TEST_IMPORT.mdto reflect the new ported count and document additional divergences/equivalent coverage.Reviewed by Cursor Bugbot for commit a3ba2f6. Bugbot is set up for automated code reviews on this repo. Configure here.