SD-10171: Track install profile per asset#151
Conversation
- Add Profile field to the install tracker - Stamp profile on install, repair and up-to-date runs - Make vault list --installed read the tracker, filter by profile
This comment has been minimized.
This comment has been minimized.
- Filter uninstall to the current profile (empty = current)
This comment has been minimized.
This comment has been minimized.
|
Addressed the feedback — fixed 7 items. Skipping 3:
|
|
Claude finished @inesp's task in 4m 23s —— View job Code ReviewThe follow-up commit cleanly addresses the orphaned doc comment and improves discoverability with per-row repo labels. A few new issues introduced by the second commit warrant a look — none blocking. [LOW] Two `// Step 5` comments after inserting the new profile filter stepLocation: Issue: The new "Step 4: Filter to the current profile" was inserted between the old Step 3 and Step 4, but the subsequent step numbers weren't shifted. The existing scope-filter block was renumbered to // Step 5: Filter plan by scope (without --all, only current repo's assets)
plan = filterUninstallPlanByScope(plan, opts.All)
...
// Step 5: Filter plan by client flag if provided ← duplicate
if opts.ClientsFlag != "" {Suggestion: Renumber the trailing blocks (client filter → Step 6, display → Step 7, etc.) or drop the numeric labels entirely. Fix this → [MEDIUM] `vault list --installed --json` now emits duplicates when one asset spans multiple scopesLocation: Issue: The old path read Suggestion: Either (a) include the scope in the JSON output ( [LOW] `config.Load()` failure silently skips the profile filter — broader uninstall than the rest of the code suggestsLocation: Issue: When Suggestion: At minimum, log a warning (via [LOW] `install.go` profile-fallback comment misdescribes when the lookup is emptyLocation: Issue: The comment says "The lookup is Suggestion: Drop the "(default/unnamed) profile" phrasing and keep just the second half: "empty when the asset is missing from the merge map (e.g., on a repair run with nil origin) — preserve any profile already on the tracker entry rather than blanking it." Fix this → |
install,repairand up-to-date runsvault list --installedread the tracker, filter by profile <- old profile-less entries are counted towards every profile, just like they were until now~/.cache/sx/installed.json: