fix(cli): omit inherited body flags from intent commands - #64
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 25 files
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 1 file (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 generated CLI intent commands to stop inheriting the backing operation's body flags, removing contradictory flags and updating help, usage, fixtures, docs, and regression tests. The change is bounded and exposure-reducing, with no operational tradeoffs requiring human judgment.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 2 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 generated CLI intent commands to stop inheriting the backing operation's body flags, removing contradictory flags and updating help, usage, fixtures, docs, and regression tests. The change is bounded and exposure-reducing, with no operational tradeoffs requiring human judgment.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 13 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 generated CLI intent commands to stop inheriting backing operation body flags, removing contradictory dual body surfaces and updating help, usage, docs, and tests. The change is bounded and exposure-reducing, with no operational tradeoff needing human judgment.
Re-trigger cubic
Why
Single-route intent commands inherit the backing operation's body flags, defaults, and union descriptions. Those can contradict the intent's pinned variant and declared inputs, while exposing a second whole-body flag alongside the intended JSON body escape.
What changed
Review notes
Inherited body-field flags are no longer available on JSON-body intents. Use the intent's declared inputs and JSON body flag, or the generated operation command for full field-level control. Multipart intents retain their existing upload flags. Body merging and preset precedence are unchanged.
Testing
npm run formatandmake check-template-cli: passed.TARGET=review make test-cli: passed (539 tests, 2 skipped).TARGET=primary make test-cli: 1,440 tests ran with one obsolete assertion expecting an inherited body alias. Updated that assertion, regenerated both fixtures, and ran the focused checks below successfully. The full primary suite was not repeated after that correction.TARGET=review make build-cliandTARGET=primary make build-cli: passed on the final implementation, including compile and staticcheck.go test ./tests -run 'TestIntent|TestReadmeExamples|TestUsage' -count=1: passed in both generated fixtures after the final changes.-m, and--bodyall survive in the request.git diff --check: passed.make lint: blocked by the existing gofmt failure in unchangedtemplates/perms.go.Public-safety check
git diff --check.Summary by cubic
Fixes intent commands so a JSON body escape no longer inherits the backing operation's body flags, defaults, or union descriptions. Intent commands now expose only their declared inputs plus the
--bodyJSON escape, avoiding a second, contradictory whole-body flag.--bodymerges with intent inputs and rejects duplicate keys, with updated usage, help, and regression tests.Written for commit 0e62306. Summary will update on new commits.