Skip to content

fix(cli): remove "nano" from projects/branches create --size enum#5799

Draft
Coly010 wants to merge 1 commit into
developfrom
columferry/cli-1869-projects-create-branches-create-remove-nano-from-size-enum
Draft

fix(cli): remove "nano" from projects/branches create --size enum#5799
Coly010 wants to merge 1 commit into
developfrom
columferry/cli-1869-projects-create-branches-create-remove-nano-from-size-enum

Conversation

@Coly010

@Coly010 Coly010 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix (Go parity).

What is the current behavior?

Go's --size flag on projects create (apps/cli-go/cmd/projects.go:34-55) is a single shared 18-value EnumFlag reused by branches create (apps/cli-go/cmd/branches.go:212), and does not include "nano" (or "pico"). The TS legacy port's INSTANCE_SIZES (projects/create/create.command.ts) and BRANCH_SIZES (branches/create/create.command.ts) both included "nano" as a valid Flag.choice value, so --size nano silently 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 nano genuinely errors with invalid 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 accepted desired_instance_size values, and next/'s independently-authored branches create already 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 nano is now rejected identically on both projects create and branches 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's Flag.choice error-message formatting, found during this PR's review).

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.
@Coly010

Coly010 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 8e1189d862

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

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.

1 participant