Describe the bug
Two related problems in the package-restore path:
-
installPackages aborts on the first failed install. internal/packages/snapshot.go:171-179:
for _, pkg := range pkgs {
...
if err != nil {
return err
}
}
A single failed npm install -g (404, deprecated/unpublished package, transient network error) stops the loop entirely — every later package in the snapshot is silently never attempted.
-
MigrationReport is fully dead code. internal/packages/report.go's NewMigrationReport, AddResult, and Save() have zero call sites anywhere in the repo (confirmed by repo-wide grep). Despite README/CHANGELOG describing a "migration report" as a Phase 3 deliverable, no report is ever written to <DataDir>/reports/. Failures surface only as a single cmd.Printf("Warning: restore failed: %v\n") with no per-package detail (which package failed, how many were skipped).
Suggested fix
- Change
installPackages to continue past a failed install, collecting a PackageResult per package (success/failed/skipped) instead of returning on the first error.
- Either wire
MigrationReport into this loop and write it to <DataDir>/reports/ on every restore (matching the documented feature), or remove report.go entirely if the report feature is being deprioritized — don't leave a half-built, unused type in place.
Severity
High — failed migrations are invisible to the user beyond one generic warning line, and the rest of the snapshot silently never gets restored.
Describe the bug
Two related problems in the package-restore path:
installPackagesaborts on the first failed install.internal/packages/snapshot.go:171-179:A single failed
npm install -g(404, deprecated/unpublished package, transient network error) stops the loop entirely — every later package in the snapshot is silently never attempted.MigrationReportis fully dead code.internal/packages/report.go'sNewMigrationReport,AddResult, andSave()have zero call sites anywhere in the repo (confirmed by repo-wide grep). Despite README/CHANGELOG describing a "migration report" as a Phase 3 deliverable, no report is ever written to<DataDir>/reports/. Failures surface only as a singlecmd.Printf("Warning: restore failed: %v\n")with no per-package detail (which package failed, how many were skipped).Suggested fix
installPackagesto continue past a failed install, collecting aPackageResultper package (success/failed/skipped) instead of returning on the first error.MigrationReportinto this loop and write it to<DataDir>/reports/on every restore (matching the documented feature), or removereport.goentirely if the report feature is being deprioritized — don't leave a half-built, unused type in place.Severity
High — failed migrations are invisible to the user beyond one generic warning line, and the rest of the snapshot silently never gets restored.