feat: one-command migration of storage.sdkPath #839
All Vouch review confidence checks passed
Residual risk 0.35 = Change Risk (0.65) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.65 · 334 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.348
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.065
Real PR Conversation Timeline
1 comments
"Review active on #839"
general
weight: 0.35
mvanhorn
Background
Updating
storage.sdkPathviavfox configonly changes the setting and leaves previously installed SDKs behind. Moving an install root to another location requires manually relocating files, updating existing symlinks and environment paths, or reinstalling SDKs.Summary of the fix
Adds
vfox migrate <path>(cmd/commands/migrate.go) backed byManager.MigrateSdkPath(internal/sdk_path_migrate.go) to validate the destination, move entries from the current install root, and write the newstorage.sdkPathto the user config. Cross-device moves fall back to a copy preserving symlinks and junctions, directory links pointing into the old root are retargeted in the globalsdksdir, the invoking project's.vfox/sdks, and session dirs under$VFOX_HOME/tmp(links in other projects are not touched; rerunvfox usethere), absolute symlinks inside the moved SDKs that point into the old root are rewritten, only vfox-managed SDK directories move (anything else in the root is refused), migration refuses while an install lock is held, and failures prior to saving config roll back moved entries and links. On Windows,env.RewriteInstallRootInRegistryrewrites matching path prefixes inHKEY_CURRENT_USER\Environment(warning without rollback on error). Updates Clink completions, documentation, and unit/CLI tests.Verification
Ran
gofmt -l cmd/cmd.go cmd/commands/cli_test.go cmd/commands/migrate.go cmd/commands/migrate_cli_test.go internal/env/registry.go internal/env/registry_stub.go internal/env/registry_utils.go internal/env/registry_utils_test.go internal/env/registry_windows.go internal/sdk_path_migrate.go internal/sdk_path_migrate_test.go internal/shell/clink_test.gowith no unformatted files reported. Rango vet ./cmd/... ./cmd/commands/... ./internal/... ./internal/env/... ./internal/shell/...with no issues reported. Rango test ./cmd/... ./cmd/commands/... ./internal/... ./internal/env/... ./internal/shell/...and all test packages passed. Rango test ./internal/sdk -vin a Linux container (golang:1.24) for the vfox newCmd change; it passed. The tests incmd/commands/cli_test.go,cmd/commands/migrate_cli_test.goandinternal/env/registry_utils_test.goand the other changed tests fail without the fix in the vfox newCmd change (checked by reverting the source changes).The changed test cmd/commands/cli_test.go did not run here: no test runner for it was available. The new test cmd/commands/migrate_cli_test.go did not run here: no test runner for it was available. The changed test internal/env/registry_utils_test.go did not run here: no test runner for it was available.
Fixes #307