diff --git a/.github/workflows/auto_optimization_pr.yml b/.github/workflows/auto_optimization_pr.yml index 357b4f0..c5537f2 100644 --- a/.github/workflows/auto_optimization_pr.yml +++ b/.github/workflows/auto_optimization_pr.yml @@ -127,6 +127,7 @@ jobs: - name: Run Claude auto optimization if: steps.prereqs.outputs.has_anthropic_key == 'true' && steps.auto_payload.outputs.should_run == 'true' + timeout-minutes: 15 uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} @@ -144,7 +145,8 @@ jobs: Do not change production selector logic or ranking behavior from this issue alone. If an eligible task is marked `experiment-only`, keep the change non-production. If the selected low-risk tasks already appear implemented on the current main branch, leave the working tree unchanged. - Run the most relevant tests or ruff checks when you make a change. + Do not use Bash in this workflow. Limit yourself to file edits and repository-local reasoning. + The workflow will run CI after the draft PR is created. ## Issue Title ${{ steps.issue_context.outputs.issue_title }} diff --git a/tests/test_auto_optimization_pr_workflow_config.py b/tests/test_auto_optimization_pr_workflow_config.py index 8d3869f..5db08c2 100644 --- a/tests/test_auto_optimization_pr_workflow_config.py +++ b/tests/test_auto_optimization_pr_workflow_config.py @@ -25,7 +25,10 @@ def test_auto_optimization_workflow_handles_monthly_task_issues(self) -> None: self.assertIn("anthropics/claude-code-action@v1", workflow) self.assertIn("Export selected task summary", workflow) self.assertIn("claude_args: --max-turns 8", workflow) + self.assertIn("timeout-minutes: 15", workflow) self.assertIn("steps.selected_tasks.outputs.task_summary", workflow) + self.assertIn("Do not use Bash in this workflow.", workflow) + self.assertIn("The workflow will run CI after the draft PR is created.", workflow) self.assertIn("gh pr create --draft", workflow) self.assertIn("gh workflow run ci.yml", workflow) self.assertIn("fetch-depth: 0", workflow)