Repository navigation
fix: a box newer than the app is no longer called outdated, nor downgraded - #121
Merged
Merged
Conversation
…ed, nor downgraded by update all The build check compared build hashes only, so a laptop on 0.3.11 took a 0.3.22 box for outdated, and Update all (or automatic updates) would have put the older berthd on it. A box now says its release in /v1/info, and berth upgrade compares releases when both are known: a newer box isn't outdated, and upgrading it needs --force. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
On a 0.3.11 app with a box on 0.3.22, the app said the box needed upgrading.
berth upgrade BOX --check, which the app asks, counted a box as outdated whenever its build hash differed from the daemon the laptop ships, newer or older. Update all, or Update boxes automatically, would then have put the olderberthdon the newer box.The fix
/v1/infogainsversion(v0.3.22, ordev).berth upgrade --checkcompares releases when both are known: a box on a newer release isn't outdated.--check --jsonaddsnewerandversion, and the text says to update the app instead.berth upgrade BOXwon't downgrade a newer box unless given--force, so Update all can't either.Limit: this helps only once the app and the box both have it. A box from before this release doesn't report its version, and an already-installed old app keeps its old check.
Checks
go vet ./...passes.TestABoxOnANewerReleaseIsNotOutdated,TestReleasesAreOrderedAndDevBuildsAreNot, andTestInfoNamesTheAccountToLogInAsnow checks the box'sversion.go test -race ./...: everything passes on my Mac exceptTestAttachPassesShiftEnter. That test came in with feat(app): mac terminal keys work in terminals, and shift+enter is a newline in claude code #118 and fails on clean main on macOS too (tmux 3.7c, 10 of 10 runs); it passed on feat(app): mac terminal keys work in terminals, and shift+enter is a newline in claude code #118's Linux CI. Worth a look of its own, as Shift+Enter may not reach a program on a macOS box.berth helpand the CLI reference list--force.🤖 Generated with Claude Code