Repository navigation
Validate plugin updates before changing installed checkouts - #10711
yashranaway wants to merge 10 commits into
Conversation
[High impact] Changes how plugin updates are staged and validated. The PR is not ready to merge while a partially failed batch explicitly reloads the failed plugin’s local state. SummaryThe PR validates fetched plugin revisions in a temporary checkout before fast-forwarding installed plugins and updates the manual and regression tests.
|
|
Reviewed at 256629e against The bug, reproduced. I set up a plugin checkout with an uncommitted edit to a file upstream doesn't touch ( The regression. The same check after the merge (line 106) has a second failure mode. If a running helper writes its cache between the fast-forward and the recheck, the update has already been installed but is reported as failed. The batch rescan. Line 164 skips A smaller fix would keep the staging validation, which is what actually fixes the bug, and leave out the blanket clean-checkout check. That way a local edit Git can't fast-forward past is still refused by Tests run. Overlap. #13006 (pausing the local watcher during updates) and #13345 ( The second opinion was Codex at medium effort. It agreed with the regression, but it could read this session's notes, so that agreement isn't a guaranteed independent check. It added the post-merge race and the stale-reload gap, and I checked both against the source. This is waiting on the author. |
Comments Outside DiffThese findings could not be posted inline.
|
|
Fixed in f6649ba. Validation still happens before the checkout changes, but unrelated edits and ignored runtime files can stay. Git refuses overlapping edits and ignored path collisions, and a partial batch rescans successful updates. The plugin update regression covers those cases, merge-time writes, and interruption. |
|
Re-reviewed at f6649ba against The bug, reproduced again. My own reproduction: a plugin checkout with an uncommitted edit to The earlier regression. I used the same plugin with an ignored Greptile's rescan comment ( Tests run. Overlap. #13006 and #13345 still edit this script and will conflict with it. They fix different bugs, so they aren't competing fixes. The second opinion was Codex at medium effort. It agreed the bug is real and the fix is proportionate. It could read this session's notes, so that agreement isn't a guaranteed independent check. It raised two ways the staged tree could differ from what the fast-forward installs. I don't think either can happen in practice. Populated submodules can't happen, because |
This validates a fetched plugin revision before changing the installed checkout. A bad revision leaves local edits alone, and a successful update needs no destructive rollback.
Git still decides whether an update can land. Unrelated edits and cache files stay in place, while overlapping changes or ignored files at new upstream paths stop the update. Successful entries in a partial batch still request a rescan.