Repository navigation
Conversation
|
/unicoder /review-pr |
There was a problem hiding this comment.
Running install from the newly activated version after a successful pub update is a sound way to move plugins to the new pins. Gating it on the manifest keeps it off machines that were never set up. Using inheritStdio lets the picker show what is already installed. Error handling and exit-code propagation are tidy, and the tests cover the main branches well (no manifest, no home, the start failure, the child's exit code, and no reinstall after a failed pub update or when already on the latest version).
One correctness problem: the child runs a bare install, so it does not reuse the choices the user made in their earlier install.
- Harness selection is lost. A bare
installruns detection again. A user who raninstall --only claudeorinstall --no-codexgets every detected harness configured, including ones they opted out of. The manifest already records plugins per harness (manifest.plugins.keys), soupdatecould pass--only <recorded harnesses>. - Plugin selection is lost when stdin is not a terminal.
InstallCommand._selectPluginsinstalls every pinned plugin when_hasTerminalis false. Sovgv_ai updaterun from a script, in CI, or with stdin piped quietly installs plugins the user had left out. Passing--pluginfor each recorded plugin when stdin is not a terminal would keep their choice. In a terminal the picker already defaults to what was recorded.
Smaller point: root flags such as --verbose are not forwarded to the child, so a verbose update runs a non-verbose install.
I suggest building the child arguments from the loaded manifest and adding tests for those arguments, for example a manifest recording only one harness.
|
/unicoder /review-pr |
There was a problem hiding this comment.
Thanks for working through the earlier review. Most of it is fixed:
- The reinstall now passes
--onlyfor each recorded harness, so it no longer runs detection again. - It passes
--pluginfor the recorded plugins, so a run outside a terminal no longer installs every pinned plugin. --verboseis forwarded to the child.- An unreadable manifest is now handled:
updateskips the reinstall instead of failing. - The tests now write a real manifest and check the arguments the child gets.
The new argument building has some problems of its own:
- The merged plugin list gives harnesses plugins they never had. Each harness records its own plugins, but
--pluginapplies to every harness--onlynames. If claude recorded onlyvgv-wingspanand codex recordedvgv-wingspanandvgv-ffca-plugin, the reinstall addsvgv-ffca-pluginto claude, and_pluginVersionsthen records it there. The testreinstalls just the recorded harnesses and pluginsasserts exactly this behaviour. That contradicts the doc comment, which says the reinstall never widens the user's choices. - A plugin the new version no longer pins breaks the reinstall.
--pluginusesallowed: vgvPluginsfrom the new version. If a recorded plugin was dropped or renamed, the child exits with a usage error and nothing is reinstalled. - A manifest with no plugin record still runs a bare
install. This covers a manifest that is malformed (it decodes as empty) or one that has nopluginsfield. Detection runs again and, outside a terminal, every pinned plugin is installed. That is the same widening the earlier review raised. Thereinstalls with the updated version after an installtest expects this behaviour.
|
/unicoder /review-pr |
There was a problem hiding this comment.
Thanks for this revision. Moving the selection into a hidden install --refresh flag is a cleaner design than having the old binary build the arguments. The new version now decides what to reinstall against its own pin list, which fixes two of the three earlier points:
- Fixed: dropped or renamed plugins.
_recordedPluginsintersects the recorded names withvgvPluginsand warns about the rest, so the reinstall no longer fails with a usage error. Theskips a recorded plugin this version no longer pinstest covers this. - Fixed: no plugin record. An empty or malformed manifest now stops with
Nothing to refresh…instead of running a bareinstall. That means no new detection and no install-everything outside a terminal. Theinstalls nothing without a recorded installtest covers this. - New: passing
--refreshtogether with--only,--pluginor a harness flag is now a usage error, and has a test.
Still open: each harness can still end up with plugins it never had. The union logic moved from update into _recordedPlugins, but it behaves the same. Details are in the inline comment. The new reinstalls the recorded harnesses and plugins test gives both harnesses the same plugin, so it does not catch this.
| InstallManifest manifest, | ||
| Set<Harness> selected, | ||
| ) { | ||
| final recorded = { |
There was a problem hiding this comment.
This is still the union-widening problem from the last review; it has moved here from update. _recordedPlugins merges every selected harness's plugins into one set, and translate and _pluginVersions then apply that set to every harness in selected.
Example: the manifest records claude: {vgv-wingspan} and codex: {vgv-wingspan, vgv-ffca-plugin}. update then installs vgv-ffca-plugin for claude and records it under claude, so each later refresh keeps it there.
Now that --refresh runs inside the new version, a fix doesn't need multiple child processes. Two options:
- Group the harnesses by their recorded, still-pinned plugin set, then run resolve, translate and reconcile once per group.
- Translate the full union, then keep only each harness's own plugins when writing the plan and calling
_pluginVersions.
It's also worth giving the two harnesses different plugin sets in reinstalls the recorded harnesses and plugins, so the test fails on the current behaviour.
There was a problem hiding this comment.
Intentional. install applies one plugin selection across every harness it configures, and --refresh keeps that model. Per-harness plugin sets only arise from separate install --only runs, and we're not changing that in this PR.
|
/unicoder /review-pr |
There was a problem hiding this comment.
Re-checked against the current diff. The two fixes from last time still hold, and the new parts look correct:
- Flag rejection: passing
--refreshwith--only,--pluginor a harness flag is rejected, and the test covers it. - Manifest check:
updateonly reinstalls when a manifest file exists.ManifestStore.savedeletes the file once it records nothing, so a fulluninstallstopsupdatefrom reinstalling afterwards. - Child process: it runs from the newly activated version via
Platform.resolvedExecutable, which isdartunderpub global. It forwards--verbose, inherits stdio, andupdatereturns the child's exit code. - Test isolation:
command_runner_testnow givesUpdateCommandan empty environment, so it never reinstalls into the real home directory.
Still open: the union-widening problem from my last review. _recordedPlugins still merges every recorded harness's plugins into one set, and translate and _pluginVersions then apply that set to every harness in selected. The reinstalls the recorded harnesses and plugins test still gives both harnesses the same plugin, so it does not catch this. See the earlier inline comment; I am not repeating it here.
New, minor: when every recorded plugin has been dropped from the pins, --refresh falls through to the interactive-install error message. It tells the user to pass --plugin, which --refresh rejects. Details are in the inline comment.
Description
vgv_ai updateonly updated the binary, so installed hooks and plugins stayed on the old pins until the user reraninstall.updatenow runsdart pub global run vgv_ai_cli:vgv_ai install. That runs the newly activated version, which has the new pins.install.install --refresh, a new hidden flag: it reinstalls the harnesses and plugins the manifest records at the new pins, without detecting or prompting. A plugin the new version no longer pins is skipped with a warning.vgv_ai installafter upgrading.Type of Change