fix(cli): correct empty request body examples and flags - #69
TristanSpeakEasy wants to merge 5 commits into
Conversation
|
@TristanSpeakEasy I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Shadow auto-approve: would not auto-approve because issues were found.
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 11 files (changes from recent commits).
Shadow auto-approve: would not auto-approve because issues were found.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Fixes CLI generation for empty request bodies: omits invented help payloads, drops redundant body flags for mixed JSON/form bodies, and enforces required empty bodies, all covered by focused regression and unit tests.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 16 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Corrects CLI generation for empty request bodies: omits invented payloads, drops redundant empty-body flags, and enforces required empty bodies, all covered by focused update snapshots, runtime regression tests, and aligned generated CLI fixtures.
Re-trigger cubic
|
Merged Validation after the merge:
The primary suite and full repository lint were not rerun for this generated-checksum conflict. The previously documented local permissions-generation/lint limitation is unchanged. |
Why
An optional empty-object request body could suppress a valid parameter example in compact help, or add an invented JSON payload in full help. Mixed parameter/body operations also registered a redundant whole-body flag alongside
--body.What changed
'{}'for required empty JSON/form bodies.--body. Share that field filter with--usageand whole-body flag lookup so neither advertises a removed flag.--bodyor stdin, rejecting omission and JSONnull. Keep existing flags for empty non-body classes, nullable/optional wrappers, maps, unions, and body-only operations. Wrapped bodies retain help wording for their individual JSON flag.Testing
go test ./pkg/generate/snapshots -run '^TestSnapCLIEmptyBodyExamplesAndFlags$' -count=1, including wrapped nullable+optional bodies in both help stylesTARGET=review make test-cli(541 tests, two existing skips; also passed in CI atf679fb23)TARGET=primary make test-cli(1,449 tests)make check-template-clinpm run formatgolangci-lint run --timeout=5m ./pkg/generate/snapshots/...--usage, and dry runs: required mixed/body-only inputs send{}, required mixed bodies reject omission, optional bodies can be omitted, and unwrapped mixed empty JSON bodies expose only--body.TARGET=review make build-cli, including compilation, staticcheck, and integrity validation./scripts/check-generated-diff.sh: no repository changesgit diff --checkmake lintdoes not pass locally: inherited-trimpathbreaks permission generation. WithGOFLAGScleared, lint instead reports a gofmt issue in unchangedtemplates/perms.go. No permission-file changes are included.The full SDK suites passed before the latest help-only change, which passed the focused regression, template, formatting, and lint checks. The fixture-only follow-up changes no generator logic. CI on the latest commit is pending.
Public-safety check
.claude/skills/public-repo-communication/SKILL.md).git diff --check.