diff --git a/.changesets/1790900058-eee5daf2.yaml b/.changesets/1790900058-eee5daf2.yaml new file mode 100644 index 00000000..94cd1eeb --- /dev/null +++ b/.changesets/1790900058-eee5daf2.yaml @@ -0,0 +1,10 @@ +id: 1790900058-eee5daf2 +features: + - cliCommands +targets: + - cli +type: fix +bump: patch +description: omit inherited body flags from intent commands +author: TristanSpeakEasy +date: "2026-10-02" diff --git a/internal/features/tests.go b/internal/features/tests.go index 2b104ab7..b46a21e6 100644 --- a/internal/features/tests.go +++ b/internal/features/tests.go @@ -711,7 +711,6 @@ const ( TestIntentRouteDispatchHelpUsage TestIntentRouteDispatchInteractivePlan TestIntentRouteDispatchOverrideOnce - TestIntentsBothBodySurfacesMerged TestIntentsDiscriminatedPartialBody TestIntentsForeignSelectorAgentEnvelope TestIntentsForeignSelectorUsageError diff --git a/internal/features/tests_generated.go b/internal/features/tests_generated.go index 03d5b1b3..c6ef4a12 100644 --- a/internal/features/tests_generated.go +++ b/internal/features/tests_generated.go @@ -466,8 +466,6 @@ func (t Test) String() string { return "intent-route-dispatch-interactive-plan" case TestIntentRouteDispatchOverrideOnce: return "intent-route-dispatch-override-once" - case TestIntentsBothBodySurfacesMerged: - return "intents-both-body-surfaces-merged" case TestIntentsDiscriminatedPartialBody: return "intents-discriminated-partial-body" case TestIntentsForeignSelectorAgentEnvelope: @@ -1964,8 +1962,6 @@ func TestFromString(s string) Test { return TestIntentRouteDispatchInteractivePlan case "intent-route-dispatch-override-once": return TestIntentRouteDispatchOverrideOnce - case "intents-both-body-surfaces-merged": - return TestIntentsBothBodySurfacesMerged case "intents-discriminated-partial-body": return TestIntentsDiscriminatedPartialBody case "intents-foreign-selector-agent-envelope": @@ -3230,7 +3226,6 @@ var testList = []Test{ TestIntentRouteDispatchHelpUsage, TestIntentRouteDispatchInteractivePlan, TestIntentRouteDispatchOverrideOnce, - TestIntentsBothBodySurfacesMerged, TestIntentsDiscriminatedPartialBody, TestIntentsForeignSelectorAgentEnvelope, TestIntentsForeignSelectorUsageError, diff --git a/pkg/generate/snapshots/cli_release_go_test.go b/pkg/generate/snapshots/cli_release_go_test.go index b2efee14..d96dce60 100644 --- a/pkg/generate/snapshots/cli_release_go_test.go +++ b/pkg/generate/snapshots/cli_release_go_test.go @@ -74,6 +74,15 @@ jobs: with: fetch-depth: 0 + - name: Check release version + run: | + tag_version="${GITHUB_REF_NAME#v}" + cli_version=$(sed -n 's/^var Version = "\(.*\)"$/\1/p' internal/cli/version.go) + if [ -z "$cli_version" ] || [ "$tag_version" != "$cli_version" ]; then + printf '::error::Release tag %s does not match generated CLI version %s. Set cli.version in .speakeasy/gen.yaml to %s and regenerate before tagging.\n' "$GITHUB_REF_NAME" "$cli_version" "$tag_version" + exit 1 + fi + - name: Setup Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: @@ -1070,6 +1079,15 @@ jobs: with: fetch-depth: 0 + - name: Check release version + run: | + tag_version="${GITHUB_REF_NAME#v}" + cli_version=$(sed -n 's/^var Version = "\(.*\)"$/\1/p' internal/cli/version.go) + if [ -z "$cli_version" ] || [ "$tag_version" != "$cli_version" ]; then + printf '::error::Release tag %s does not match generated CLI version %s. Set cli.version in .speakeasy/gen.yaml to %s and regenerate before tagging.\n' "$GITHUB_REF_NAME" "$cli_version" "$tag_version" + exit 1 + fi + - name: Setup Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: @@ -2117,6 +2135,15 @@ jobs: with: fetch-depth: 0 + - name: Check release version + run: | + tag_version="${GITHUB_REF_NAME#v}" + cli_version=$(sed -n 's/^var Version = "\(.*\)"$/\1/p' internal/cli/version.go) + if [ -z "$cli_version" ] || [ "$tag_version" != "$cli_version" ]; then + printf '::error::Release tag %s does not match generated CLI version %s. Set cli.version in .speakeasy/gen.yaml to %s and regenerate before tagging.\n' "$GITHUB_REF_NAME" "$cli_version" "$tag_version" + exit 1 + fi + - name: Setup Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: diff --git a/reports/features-report.md b/reports/features-report.md index 8560e814..006eebf7 100644 --- a/reports/features-report.md +++ b/reports/features-report.md @@ -827,7 +827,6 @@ Legend: :white_check_mark: Implemented, :question_mark: Skipped, :no_entry: Not | intent-route-dispatch-help-usage | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | | intent-route-dispatch-interactive-plan | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | | intent-route-dispatch-override-once | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | -| intents-both-body-surfaces-merged | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | | intents-discriminated-partial-body | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | | intents-foreign-selector-agent-envelope | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | | intents-foreign-selector-usage-error | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | @@ -882,4 +881,4 @@ Legend: :white_check_mark: Implemented, :question_mark: Skipped, :no_entry: Not | security-ranking-source-rank | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | | event-stream-with-operation-timeout-streams-to-completion | :question_mark: | :question_mark: | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | | jsonl-stream-timeout-still-bounds-slow-stream | :question_mark: | :question_mark: | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | -| jsonl-stream-with-timeout-streams-to-completion | :question_mark: | :question_mark: | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | \ No newline at end of file +| jsonl-stream-with-timeout-streams-to-completion | :question_mark: | :question_mark: | :question_mark: | :white_check_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | :question_mark: | diff --git a/reports/tests.csv b/reports/tests.csv index af6bbb13..887e980c 100644 --- a/reports/tests.csv +++ b/reports/tests.csv @@ -689,7 +689,6 @@ intent-route-dispatch-flag-paths,:question_mark:,:white_check_mark:,:question_ma intent-route-dispatch-help-usage,:question_mark:,:white_check_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark: intent-route-dispatch-interactive-plan,:question_mark:,:white_check_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark: intent-route-dispatch-override-once,:question_mark:,:white_check_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark: -intents-both-body-surfaces-merged,:question_mark:,:white_check_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark: intents-discriminated-partial-body,:question_mark:,:white_check_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark: intents-foreign-selector-agent-envelope,:question_mark:,:white_check_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark: intents-foreign-selector-usage-error,:question_mark:,:white_check_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark:,:question_mark: diff --git a/templates/templates/cli/README.md b/templates/templates/cli/README.md index d7d2a8c9..beabb74a 100644 --- a/templates/templates/cli/README.md +++ b/templates/templates/cli/README.md @@ -572,7 +572,7 @@ Selection happens before route-local presets or schema defaults are applied. Aft `--body` remains the advanced escape and must contain a JSON object for dispatch. Its `@path`, `@-`, and stdin forms are resolved exactly once; the runtime selects from the object's keys, merges inputs and the selected preset, and replays the final object through the generic `--body` flag for the normal generated `BuildRequest` path. A body key unique to an unrouted union member returns a typed error naming the generated-operation escape. Unknown keys remain owned by `BuildRequest`'s normal body-key verification. Dispatch requires the generated operation to have flag metadata and the generic `--body` surface; pure `BuildRequestBody` operations are gated. -Dispatch commands never register backing request-body metadata: no whole-union JSON flag and no expanded body fields. They retain non-body path/query/header metadata, operation security, `--body`, `--schema`, and declared flags. Help puts route-specific flags under `