Repository navigation
claude.yml: let workflow_dispatch/schedule through the job if: gate - #246
Conversation
The job if: only matched the four reactive, mention-triggered events, so a caller wired up for unattended/periodic invocation (e.g. a scheduled skill run) got a workflow that looked correctly configured but silently skipped the claude job on every run. Both events are trusted by construction (triggering them requires repo write access), so they now pass unconditionally alongside the existing @claude-mention/author_association checks. Also updates the agent's own prompt, examples/claude.yml, and the reference docs to explain that these unattended runs get no triggering issue/PR (no branch, draft PR, or reply comment), so the actual task belongs in prompt-addendum and any output must be persisted with tools claude-args grants. Fixes #245. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019bKbFr7bpgQUnf6iFBm2mC
Codecov Report✅ All modified and coverable lines are covered by tests. |
Code reviewReviewed the diff ( Three findings posted as inline comments, most severe first:
None of these are security problems — the "trusted by construction" security conclusion itself holds up under scrutiny (verified against GitHub's documented VerdictNeeds more work — the fixable bug in finding 1 (spurious failing/warning post-steps on every unattended run, contradicting the PR's own documentation) should be addressed before merge; findings 2-3 are doc-accuracy fixes that can ride along. |
|
Claude finished review — View run Review complete. Summary of what I posted to PR #246: 3 inline comments on
Plus a top-level summary comment with the verdict. VerdictNeeds more work — finding 1 is a real behavioral bug that should be fixed before or shortly after merge; findings 2-3 are doc-accuracy fixes. The core |
…ccess wording Address review findings on #246: - Acknowledge @claude mention and Post Claude's response if no code was committed now require a triggering issue/PR number, so they're actually skipped on workflow_dispatch/schedule runs instead of running and failing (the first visibly) as the PR's own docs claimed they wouldn't. - "Both require repo write access to trigger" overstated schedule's mechanism: cron has no triggering actor or permission check at fire time, only default-branch provenance. Reworded across claude.yml, examples/ claude.yml, website/reference/claude.qmd, and the changelog fragment. - website/reference/claude.qmd's "the caller's on: just needs to include one of those triggers" was incomplete (examples/claude.yml's own new comment says the caller-side if: gate needs widening too) and used a non-ASCII em dash that failed the check-chars CI job; reworded to state both steps and drop the em dash. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019bKbFr7bpgQUnf6iFBm2mC
|
Addressed all three review findings in 3c5cff8:
Also fixed the Generated by Claude Code |
|
👀 Picked up by workflow run #29041058093. Setup runs first; Claude itself responds after that. |
2026-07-09 18:44 UTC |
|
Claude finished review — View run No stray file was created (the earlier redirect was blocked before anything was written), so nothing to clean up. Code reviewThis is a follow-up review of PR #246 after commit 3c5cff8. The prior review round (posted at the comment linked here) found three issues and returned a Needs more work verdict. I verified each against the current diff rather than trusting the author's reply at face value:
No new issues introduced by this fix commit. The VerdictReady for merge — all three findings from the prior review round are verified fixed, and no new issues were found in the fix commit. |
|
Investigated why this session was triggered. The comment that fired this run ( I checked the rest of the state to be safe:
No code change needed here. One thing worth flagging separately (not fixing now, since it's unrelated to #245's actual fix): the job — posted by @claude post-step from workflow run 💰 Cost: $0.7152426000000002 |
…#245/#246 (#247) Widening claude.yml's job if: to admit workflow_dispatch/schedule (#245) left two post-steps still ungated for those events, caught only in review (#246) rather than the author's own self-check. Record the general pattern so future if:-gate widening on this file (or claude-code-review.yml) checks downstream steps' event-shaped context up front. Claude-Session: https://claude.ai/code/session_019bKbFr7bpgQUnf6iFBm2mC Co-authored-by: Claude <[email protected]>
Closes #245.
Problem
claude.yml's reusable job'sif:only matched four reactive,mention-triggered events (
issue_comment,pull_request_review_comment,pull_request_review,issues). A caller wired up to invoke Claude onworkflow_dispatchorschedule(e.g. a periodic "run this skill weekly"automation with no human comment to react to) got a workflow that appeared
correctly configured but silently skipped the
claudejob on every run —none of the four
||branches ever evaluate true for those event types.Fix (option 1 from the issue)
workflow_dispatch/schedulebranch to the jobif:, gated onevent name alone — both events already require repo write access to
trigger, so they're trusted by construction and need no
comment-body/author-association check.
the
if:.hard-coded prompt text ("You were triggered by an @claude mention…") was
wrong for them — added a conditional intro (mirroring the existing
format()ternary pattern already used inrun-claude-review-attempt/action.yml) that instead points the agent atprompt-addendumfor the actual task, and a note that these runs get nobranch/draft-PR/reply-comment scaffolding (there's no triggering issue or
PR to attach one to).
examples/claude.ymlwith a commentedschedule/workflow_dispatchtrigger block, the matching caller-side
if:widening, and aprompt-addendumexample for stating the actual task on an unattended run.website/reference/claude.qmdto document unattended-run support.changelog.d/.Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/claude.yml'))"and same forexamples/claude.yml— both parse.&&/||ternary +format()pattern used in the new prompt line matches existing precedent in.github/actions/run-claude-review-attempt/action.yml._selftest.ymland the dogfoodclaude-review.yml) — will watch and iterate on this PR.Generated by Claude Code