fix(ci): drop track_progress where the event has no issue/PR context (#2909)

The AI fix sweep has never completed a non-empty batch. claude-code-action
rejects track_progress unless the triggering event is pull_request, issues,
issue_comment, pull_request_review_comment or pull_request_review, and
daily_ai_fix.yaml only ever runs on schedule or workflow_dispatch. The step
died in input validation after 0.3s:

  Action failed with error: track_progress is only supported for events:
  pull_request, issues, issue_comment, pull_request_review_comment,
  pull_request_review. Current event: workflow_dispatch

This went unnoticed because the step is gated on `count != '0'`, so every
run with an empty batch skipped it and reported green. Every run that
actually had issues to work through failed identically (runs 30265277395,
30011599875).

daily_ai_fix.yaml: remove it — no trigger of this workflow can ever satisfy
the constraint. Claude still comments per issue via gh, as issue-fix.md
instructs; only the run-level sticky comment is lost.

on_issue_approved.yaml: same latent failure on its workflow_dispatch path,
but the `issues` path is valid, so gate it on the event instead of dropping
it. The action defaults this input to the string "false", so the expression
result is a shape it already handles.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Alexandre
2026-07-27 14:43:32 +02:00
committed by GitHub
parent 885b055768
commit 83aa854206
2 changed files with 9 additions and 4 deletions

View File

@@ -133,9 +133,11 @@ jobs:
# workflow_dispatch by anyone else would 401. AI_PR_TOKEN, not
# GITHUB_TOKEN, so a PR Claude opens triggers CI.
github_token: ${{ secrets.AI_PR_TOKEN }}
# One sticky, auto-updating status comment per run instead of the
# model narrating its own progress in scattered comments.
track_progress: true
# No track_progress here. It needs an issue or PR to hang its sticky
# comment on, and the action hard-fails validation without one; this
# workflow only ever runs on schedule/workflow_dispatch. Per-issue
# progress still gets reported — issue-fix.md has Claude comment on
# each issue directly via gh.
prompt: |
The batch of issues to work through is /tmp/ai-fix/batch.json.
Follow .github/prompts/issue-fix.md exactly. Do not deviate from

View File

@@ -142,7 +142,10 @@ jobs:
# github.actor lacks write access. AI_PR_TOKEN, not GITHUB_TOKEN, so
# a PR Claude opens triggers CI.
github_token: ${{ secrets.AI_PR_TOKEN }}
track_progress: true
# Only the `issues` path has a comment thread to track progress in.
# On workflow_dispatch there is none, and passing true there fails
# the action's input validation outright.
track_progress: ${{ github.event_name == 'issues' }}
prompt: |
The approved plan is /tmp/ai-exec/plan.md and the issue it belongs
to is /tmp/ai-exec/issue.json. Follow .github/prompts/issue-execute-plan.md