Repository navigation
feat(cli): phase-1 consistency — autoscale list, --regions slice, -o json fix (#299 #300 #301) - #332
Merged
Merged
Conversation
…json fix (#299 #300 #301) Three additive/backward-compatible CLI-consistency changes from the 2026-07-11 audit (#328, Phase 1): #301 (fix): `spawn validate -o json` and `spawn snapshot create -o json` failed with "unknown shorthand flag" because both defined a local --output/-o that collided with the root persistent -o/--output. Removed the locals; both now read getOutputFormat(). Observable output unchanged. #300 (change): --regions was a raw comma-string on availability, collect, sweep collect, stage upload, and stage estimate. Now StringSliceVarP with a -r shorthand (matches `spawn list`), accepting comma-separated OR repeated values. Existing comma invocations keep working. #299 (add): `spawn autoscale list` (alias ls) lists active groups. The bare `autoscale status` already rendered this table; extracted the shared listAutoscaleGroups helper so both use it. status behavior unchanged. Verified: go build ./..., go vet ./cmd, gofmt clean; TestFlagConventions + affected cmd tests pass; `validate -o json` reaches command logic instead of erroring; `autoscale list`/`ls` registered.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Closes #299, #300, #301. Part of the audit tracker #328 (Phase 1). All three are additive / backward-compatible — no existing command or flag is removed or renamed.
#301 — bug (Fixed)
spawn validate -o jsonandspawn snapshot create -o jsonfailed with "unknown shorthand flag": both defined a local--output/-othat collided with the root persistent-o/--output. Removed the locals; both now readgetOutputFormat()like every other command. Same JSON/text output as before.#300 — flag consistency (Changed)
--regionswas a raw comma-string onavailability,collect,sweep collect,stage upload,stage estimate. NowStringSliceVarPwith a-rshorthand (matchingspawn list), so it accepts comma-separated or repeated values. Existing--regions us-east-1,us-west-2invocations are unaffected (no alias needed — the flag name is unchanged, only its type widened).#299 — additive (Added)
spawn autoscale list(aliasls) lists active auto-scaling groups. The bareautoscale status(no arg) already rendered this exact table and still does — I extracted a sharedlistAutoscaleGroupshelper so both paths share it. No behavior change tostatus.Verification
go build ./...,go vet ./cmd,gofmtclean.TestFlagConventions+ affected cmd tests (validate/snapshot/autoscale/stage/collect) pass.spawn validate -o jsonnow reaches command logic (previously errored on the shorthand);spawn autoscale list --helpand thelsalias resolve. Pre-existing unrelatedTestCatalogValid(feat(plugin): permissions declaration block (#388) #392) still fails onmain.CHANGELOG updated under Added / Changed / Fixed.