Skip to content

fix(cli): stop GPU candidate retries on workspace duplicate code - #516

Open
jarrad wants to merge 1 commit into
fix/brev-13209-cli-error-codesfrom
fix/brev-13207-gpu-retry
Open

jarrad wants to merge 1 commit into
fix/brev-13209-cli-error-codesfrom
fix/brev-13207-gpu-retry

Conversation

@jarrad

@jarrad jarrad commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Stop GPU-create candidate fallback only for HTTP 400 with Brev's WORKSPACE_ALREADY_EXISTS reason.
  • Keep fallback for capacity/provider failures, unknown reason codes, and unrelated text containing the old duplicate phrase.

Proof

  • TestRunGPUCreateRetryDecisions failed on the baseline: a code-only duplicate retried the second type; an unrelated provider message with duplicate workspace stopped early.
  • go test ./pkg/cmd/gpucreate -run '^TestRunGPUCreateRetryDecisions$' -count=1 passed after the fix.
  • go test ./pkg/cmd/gpucreate -count=1 passed.
  • git diff --check passed.

Exact-head validation

All runs below passed for commit 598b62caf9d196f6b8ec4d90d1a408ae09449b76:

Stack and rollout

  • Base: CLI error-code parser foundation #515. Review and merge feat(cli): preserve structured Brev HTTP error codes #515 before this PR. This review diff contains only BREV-13207.
  • Server producer: BREV-13202's brev-deploy workspace-create contract must deploy before this CLI behavior can recognize duplicates. It emits fixed HTTP 400 with errors[].code = WORKSPACE_ALREADY_EXISTS.
  • This PR changes retry control only; it does not alter server responses or generic failure handling.

@jarrad
jarrad marked this pull request as ready for review October 21, 2026 15:20
@jarrad
jarrad requested a review from a team as a code owner October 21, 2026 15:20
@jarrad
jarrad added this pull request to stack #518 October 21, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants