diff --git a/.github/workflows/auto_optimization_pr.yml b/.github/workflows/auto_optimization_pr.yml index e460594..b936353 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 }} @@ -143,7 +144,8 @@ jobs: Prefer minimal changes in shared helpers, documentation, and tests. Avoid changing shared production strategy behavior unless the task remains clearly low-risk and local. If the selected low-risk tasks do not map cleanly to this repository, 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 429573a..1e5ca1e 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)