fix(cli): remove "nano" from projects/branches create --size enum#5799
Draft
Coly010 wants to merge 1 commit into
Draft
Conversation
Go's --size EnumFlag (apps/cli-go/cmd/projects.go:34-55, reused by branches create at cmd/branches.go:212) is an 18-value list that omits "nano" (and "pico") and strictly rejects any other value at flag-parse time. TS listed "nano" as a valid choice on both projects create and branches create, silently succeeding where Go errors. Fixes CLI-1869.
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
What kind of change does this PR introduce?
Bug fix (Go parity).
What is the current behavior?
Go's
--sizeflag onprojects create(apps/cli-go/cmd/projects.go:34-55) is a single shared 18-valueEnumFlagreused bybranches create(apps/cli-go/cmd/branches.go:212), and does not include"nano"(or"pico"). The TS legacy port'sINSTANCE_SIZES(projects/create/create.command.ts) andBRANCH_SIZES(branches/create/create.command.ts) both included"nano"as a validFlag.choicevalue, so--size nanosilently succeeded in TS while Go rejects it.Verified directly against the real, compiled Go binary (
apps/cli-go) rather than just reading source —projects create --size nanogenuinely errors withinvalid argument "nano" for "--size" flag: must be one of [...], confirming this is current, shipped Go behavior and not a stale enum.Note: the live Management API contract (
packages/api/src/generated/contracts.ts) does list"nano"/"pico"as accepteddesired_instance_sizevalues, andnext/'s independently-authoredbranches createalready exposes both. Neither the Go CLI nor this legacy port surfaces them as CLI options, though — that's a separate product question (filed as CLI-1897) about whether these tiers should eventually be CLI-selectable, not a reason to keep an option the legacy shell's own Go-parity contract says should be rejected.What is the new behavior?
--size nanois now rejected identically on bothprojects createandbranches create, matching Go's 18-value enum exactly.Fixes CLI-1869. See also CLI-1897 (product decision on nano/pico) and CLI-1898 (unrelated pre-existing bug in
effect'sFlag.choiceerror-message formatting, found during this PR's review).