Skip to content

Commit 643c18f

Browse files
fix: end-to-end agent fixes + PR trigger for testing
- Fix Python 3.9 f-string nested quote error - Add comprehensive debug output (logs, prompt, LLM response, errors) - Add pull_request trigger so the agent runs on this PR for testing - Add workflow_dispatch for manual testing after merge - Hardcoded test values: branch=auto-update/vllm-99.99.99, run_id=25531385153 TODO after validation: remove pull_request trigger and hardcoded values
1 parent 9d519f6 commit 643c18f

2 files changed

Lines changed: 25 additions & 6 deletions

File tree

.github/workflows/agent-currency-fix.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ on:
88
workflow_run:
99
workflows: ["Merge Conditions"]
1010
types: [completed]
11+
# Manual trigger for testing (remove after validation)
12+
workflow_dispatch:
13+
inputs:
14+
branch:
15+
description: "PR branch (e.g., auto-update/vllm-99.99.99)"
16+
required: true
17+
run_id:
18+
description: "Failed workflow run ID"
19+
required: true
20+
# PR trigger for testing (remove after validation)
21+
pull_request:
22+
branches: [main]
23+
paths:
24+
- "scripts/autocurrency/agent-fix.py"
25+
- ".github/workflows/agent-currency-fix.yml"
1126

1227
permissions:
1328
contents: read
@@ -23,16 +38,19 @@ env:
2338
jobs:
2439
fix-agent:
2540
if: >-
26-
github.event.workflow_run.conclusion == 'failure' &&
27-
startsWith(github.event.workflow_run.head_branch, 'auto-update/')
41+
github.event_name == 'workflow_dispatch' ||
42+
github.event_name == 'pull_request' || (
43+
github.event.workflow_run.conclusion == 'failure' &&
44+
startsWith(github.event.workflow_run.head_branch, 'auto-update/')
45+
)
2846
runs-on:
2947
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
3048
fleet:default-runner
3149
buildspec-override:true
3250
env:
33-
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
34-
RUN_ID: ${{ github.event.workflow_run.id }}
35-
RUN_URL: ${{ github.event.workflow_run.html_url }}
51+
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch || inputs.branch || 'auto-update/vllm-99.99.99' }}
52+
RUN_ID: ${{ github.event.workflow_run.id || inputs.run_id || '25531385153' }}
53+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
3654
steps:
3755
- name: Validate branch name
3856
run: |

scripts/autocurrency/agent-fix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ def main():
336336

337337
blocks = parse_blocks(response)
338338
if blocks:
339-
print(f"Parsed {len(blocks)} block(s): {[b["path"] for b in blocks]}")
339+
paths = [b["path"] for b in blocks]
340+
print(f"Parsed {len(blocks)} block(s): {paths}")
340341
if not blocks:
341342
retry_context = (
342343
f"Could not parse search/replace blocks from response.\n"

0 commit comments

Comments
 (0)