Repository navigation
BREV-13200: fail closed on account creation errors in CLI login - #519
Merged
Merged
Conversation
jarrad
marked this pull request as ready for review
October 21, 2026 15:59
callen-bot
approved these changes
Oct 21, 2026
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.
Summary
LoginStore.CreateUserdirectly and continue to/api/meonly after a successful account API response.CreateNewUser(bool, error)helper. Its sole caller discarded the boolean, and a successful HTTP 201 cannot distinguish a new account from one brev-deploy recovered for the same token.Account contract and rollout
The live CLI calls brev-deploy
POST /api/users, not dev-plane directly. BREV-13201 makes brev-deploy consume dev-planeAlreadyExists, resolve only the account owned by the supplied token, and return HTTP 201. A username collision with no account for that token remains an error. There is no public duplicate-account code for the CLI to consume, so the oldfalse, niltext-match path is obsolete.Deploy BREV-13201's dev-plane producer first, then its brev-deploy bridge, before releasing this CLI change. This PR targets brev-cli
mainand does not depend on generic CLI parser PR #515.Proof
uncoded_collision_textincorrectly continued to/api/me.go test ./pkg/cmd/login -count=1after both commits.8f07a09a, build, format, lint, vet, CodeQL, CLI output compatibility, and full repository tests passed. GitHub's release-test steps and workflow report success, though the job/check record remainsin_progressat the time of this update.git diff --checkpassed and the worktree is clean.Issue: https://linear.app/nvidia/issue/BREV-13200/replace-duplicate-user-text-matching-in-brev-cli-login