diff --git a/.github/workflows/feature-ideation-reusable.yml b/.github/workflows/feature-ideation-reusable.yml index fc85de206..07be8672a 100644 --- a/.github/workflows/feature-ideation-reusable.yml +++ b/.github/workflows/feature-ideation-reusable.yml @@ -72,10 +72,13 @@ on: default: 'standard' type: string model: - description: > - Model family — `opus` (default, recommended), `sonnet`, or `haiku`. - The resolver/CLI maps the family to the current version ID. An - operator MAY override with a concrete model ID for a one-off pin. + # The Claude Code CLI resolves the family client-side (`--model opus` + # in the analyst step) to the current version ID — never pin a + # version ID here. See standards/agent-standards.md. + description: >- + Model family (`opus` recommended — Sonnet produces shallower adversarial + passes) or an explicit model ID. Client-side resolution by the Claude Code + CLI; never pin a version-specific model ID. required: false default: 'opus' type: string @@ -332,6 +335,8 @@ jobs: ENHANCE_BACKLOG: ${{ inputs.enhance_backlog && '1' || '0' }} SOURCES_FILE_PATH: ${{ inputs.sources_file }} RESEARCH_DEPTH: ${{ inputs.research_depth }} + # Model family resolution: `--model` is passed through to the Claude + # CLI, which resolves the family alias (#1210 AC3). uses: anthropics/claude-code-action@4fa93a88de49bbef68b10eb15aabedf28ca0e1ed # v1.0.271 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} diff --git a/.github/workflows/feature-ideation-tests.yml b/.github/workflows/feature-ideation-tests.yml index c777ec899..7ea3ef404 100644 --- a/.github/workflows/feature-ideation-tests.yml +++ b/.github/workflows/feature-ideation-tests.yml @@ -76,7 +76,9 @@ jobs: tmp="$(mktemp -d)" # --proto '=https' --proto-redir '=https' enforces HTTPS on both the # initial request and any redirect -L follows (SonarCloud S6506, #1360). - curl -sL --proto '=https' --proto-redir '=https' -o "${tmp}/yq" \ + # Same retry/timeout flags as the install step above (#739). + curl -sSfL --proto '=https' --proto-redir '=https' --connect-timeout 10 --max-time 60 \ + --retry 5 --retry-delay 2 --retry-connrefused --retry-all-errors -o "${tmp}/yq" \ "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" echo "${YQ_SHA256} ${tmp}/yq" | sha256sum -c - sudo install -m 0755 "${tmp}/yq" /usr/local/bin/yq diff --git a/test/workflows/feature-ideation/model-input.bats b/test/workflows/feature-ideation/model-input.bats new file mode 100644 index 000000000..dd5d4fe0e --- /dev/null +++ b/test/workflows/feature-ideation/model-input.bats @@ -0,0 +1,39 @@ +#!/usr/bin/env bats +# Tests for the `model` input of the reusable feature-ideation workflow +# (issue #1210). The default must be the model FAMILY (`opus`) so the BMAD +# Analyst auto-tracks the current Opus via the Claude Code CLI's client-side +# alias resolution — a pinned version id must never be the default. + +load 'helpers/setup' + +WF="${TT_REPO_ROOT}/.github/workflows/feature-ideation-reusable.yml" + +@test "model input: default is the opus family" { + run yq -r '.on.workflow_call.inputs.model.default' "$WF" + [ "$status" -eq 0 ] + [ "$output" = "opus" ] +} + +@test "model input: default is not a pinned claude-* version id" { + run yq -r '.on.workflow_call.inputs.model.default' "$WF" + [ "$status" -eq 0 ] + [[ "$output" != claude-* ]] +} + +@test "model input: description recommends the opus family with an id override" { + run yq -r '.on.workflow_call.inputs.model.description' "$WF" + [ "$status" -eq 0 ] + [ "$output" = 'Model family (`opus` recommended — Sonnet produces shallower adversarial passes) or an explicit model ID. Client-side resolution by the Claude Code CLI; never pin a version-specific model ID.' ] +} + +@test "analyst step: model is passed via --model so the CLI resolves the family" { + run yq -r '.jobs[].steps[]? | select(.name == "Run Claude Code — BMAD Analyst") | .with.claude_args' "$WF" + [ "$status" -eq 0 ] + [[ "$output" == *'--model ${{ inputs.model }}'* ]] +} + +@test "analyst step: no ANTHROPIC_MODEL env bypasses the CLI's alias resolver" { + run yq -r '.jobs[].steps[]? | select(.name == "Run Claude Code — BMAD Analyst") | .env // {} | has("ANTHROPIC_MODEL")' "$WF" + [ "$status" -eq 0 ] + [ "$output" = "false" ] +}