Skip to content

Commit 73f526d

Browse files
committed
fix: bound auto optimization prompts
1 parent c7af110 commit 73f526d

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/auto_optimization_pr.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ jobs:
100100
- name: Append task summary
101101
run: cat data/output/auto_optimization/task_summary.md >> "$GITHUB_STEP_SUMMARY"
102102

103+
- name: Export selected task summary
104+
id: selected_tasks
105+
run: |
106+
{
107+
echo "task_summary<<EOF"
108+
cat data/output/auto_optimization/task_summary.md
109+
echo "EOF"
110+
} >> "$GITHUB_OUTPUT"
111+
103112
- name: Append skip reason
104113
if: steps.prereqs.outputs.has_anthropic_key != 'true' || steps.auto_payload.outputs.should_run != 'true'
105114
run: |
@@ -124,6 +133,7 @@ jobs:
124133
github_token: ${{ secrets.GITHUB_TOKEN }}
125134
use_bedrock: false
126135
use_vertex: false
136+
claude_args: --max-turns 8
127137
prompt: |
128138
Do not ask for additional approval.
129139
Do not create a pull request yourself. The workflow will handle git, draft PR creation, and CI dispatch.
@@ -139,8 +149,8 @@ jobs:
139149
## Issue Title
140150
${{ steps.issue_context.outputs.issue_title }}
141151
142-
## Issue Body
143-
${{ steps.issue_context.outputs.issue_body }}
152+
## Selected Low-Risk Tasks
153+
${{ steps.selected_tasks.outputs.task_summary }}
144154
145155
- name: Detect changes
146156
id: changes

tests/test_auto_optimization_pr_workflow_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def test_auto_optimization_workflow_handles_monthly_task_issues(self) -> None:
2323
self.assertIn("ANTHROPIC_API_KEY", workflow)
2424
self.assertIn("prepare_auto_optimization_pr.py", workflow)
2525
self.assertIn("anthropics/claude-code-action@v1", workflow)
26+
self.assertIn("Export selected task summary", workflow)
27+
self.assertIn("claude_args: --max-turns 8", workflow)
28+
self.assertIn("steps.selected_tasks.outputs.task_summary", workflow)
2629
self.assertIn("gh pr create --draft", workflow)
2730
self.assertIn("gh workflow run ci.yml", workflow)
2831
self.assertIn("fetch-depth: 0", workflow)

0 commit comments

Comments
 (0)