ref: as: hypershift-generate-test-plan from: claude-ai-helpers commands: hypershift-generate-test-plan-commands.sh no_kubeconfig: true timeout: 20m0s env: - name: HYPERSHIFT_PLATFORM default: "aws" documentation: |- Platform the test plan is generated for. Must match the platform config used by create-guests and run-tests. - name: TARGET_PULL_NUMBER default: "" documentation: |- Generate the plan for this pull request of TARGET_REPO instead of the pull request that triggered the job. For rehearsals, where the triggering pull request is in openshift/release. - name: TARGET_REPO default: "openshift/hypershift" documentation: |- Repository of TARGET_PULL_NUMBER. Ignored unless TARGET_PULL_NUMBER is set. - name: TARGET_BASE_REF default: "main" documentation: |- Base branch of TARGET_PULL_NUMBER. Ignored unless TARGET_PULL_NUMBER is set. - name: CLAUDE_CODE_USE_VERTEX default: "1" documentation: |- Enable Vertex AI for Claude Code. - name: CLOUD_ML_REGION default: "global" documentation: |- Google Cloud region for Vertex AI. - name: ANTHROPIC_VERTEX_PROJECT_ID default: "openshift-ci-prow-agents" documentation: |- Google Cloud project ID for Vertex AI authentication. - name: GOOGLE_APPLICATION_CREDENTIALS default: "/var/run/claude-code-service-account/google-token" documentation: |- Path to the Google Cloud service account JSON key file for Vertex AI authentication. - name: CLAUDE_MODEL default: "claude-opus-4-6" documentation: |- Claude model to use for generating the test plan. - name: CLAUDE_TIMEOUT default: "15m" documentation: |- Timeout for the Claude/agentic-ci invocation (timeout(1) duration). - name: CLAUDE_MAX_TURNS default: "60" documentation: |- Maximum number of agent turns for the Claude invocation. resources: requests: cpu: 500m memory: 1Gi credentials: - collection: hypershift-team group: claude-prow mount_path: /var/run/claude-code-service-account documentation: |- Uses Claude to generate a focused HyperShift e2e-v2 test plan from the pull request under test and writes it to SHARED_DIR/test-plan.yaml for create-guests and run-tests. Run it as the first pre step, before any cluster exists: a failure is then cheap and SHARED_DIR holds no kubeconfig. A later hypershift-write-test-plan step with an explicit TEST_PLAN overwrites the generated plan. The pull request is untrusted input. Claude gets read-only file tools, no shell and no network tools, and is denied the credential mounts. The plan is validated against the schema, the platform's variants and the Ginkgo labels in the checkout before it is published. The step fails if generation or validation fails.