fix(lock): don't rewrite plugin_version on shell/run/install - #2989
Conversation
Every command that ran ensureStateIsUpToDate overwrote plugin_version in devbox.lock with the version of the built-in plugin embedded in the running binary, so switching Devbox versions churned the lockfile back and forth. Only fill in missing plugin versions in ensure mode; add/rm/update still overwrite them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@claude ptal |
|
Claude finished @mikeland73's task in 1m 38s —— View job Code ReviewTodo list:
SummaryThe fix looks correct and well-targeted. I traced the call chain end-to-end:
That naming overlap between the CLI
The new Nit: I wasn't able to run No blocking issues found — this looks ready to merge. |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Summary
devbox shell/run/installoverwroteplugin_versionindevbox.lockwith the version of the built-in plugin embedded in the running binary, so teams on different Devbox versions saw the lockfile flip back and forth (reported in #1371). Now those commands only fill in a missingplugin_version;add,rm, andupdatestill overwrite it. The value is only read as an "is installed" flag, so keeping an older version is harmless.How was it tested?
Added
TestUpdateLockfileVersionand rango test ./internal/plugin/ ./internal/devbox/. Built the binary and used thedlvhdr/gh-dashdocs/lockfile (nodejsplugin_version0.0.2):devbox installanddevbox runleft it unchanged,devbox update nodejsbumped it to 0.0.5, anddevbox installfilled it in when the field was missing.Community Contribution License
All community contributions in this pull request are licensed to the project
maintainers under the terms of the
Apache 2 License.
By creating this pull request, I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 License as stated in
the
Community Contribution License.
🤖 Generated with Claude Code