feat(workflow): bot-pushed commits should retrigger downstream CI - #18
Draft
heskew wants to merge 1 commit into
Draft
feat(workflow): bot-pushed commits should retrigger downstream CI#18heskew wants to merge 1 commit into
heskew wants to merge 1 commit into
Conversation
heskew
marked this pull request as draft
May 7, 2026 15:14
`git push` from the agent step uses the default `GITHUB_TOKEN`, and per GitHub's loop-prevention rule, commits pushed under that identity don't fire downstream workflows (https://docs.github.com/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow). Result: bot-authored PRs sit with stale CI on the prior SHA — Format Check, Unit Tests, Integration Tests, and `validate / validate` all silently skip the bot's commit. Hit on harper #490 today. Mint a write-scoped installation token from the same `HarperFast AI Workflows` App and pass it to `actions/checkout`'s `token:` input. `git push` then runs as the App identity, and that IS allowed to trigger downstream workflows. Applied to `_claude-mention.yml` and `_claude-issue-to-pr.yml`. Review reusable doesn't push commits, unchanged. Permission prereq: requires the App to have `Contents: Write` (and `Pull requests: Write` for the agent's `gh pr create`) installation permissions on the consumer repos. Currently has `Members: Read` only. Don't merge this PR until the App permissions are upgraded — otherwise the next consumer pin bump breaks the bot-authoring path entirely. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
heskew
force-pushed
the
workflow/test-format-check
branch
from
May 7, 2026 15:52
8411eb8 to
ca1d35d
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git pushfrom the agent step uses the defaultGITHUB_TOKEN. Per GitHub's loop-prevention rule, commits pushed under that identity don't fire downstream workflows. Result: bot-authored PRs sit with stale CI on the prior SHA — Format Check, Unit Tests, Integration Tests, andvalidate / validateall silently skip the bot's commit. Hit on harper #490 today.Fix: mint a write-scoped installation token from the existing
HarperFast AI WorkflowsApp and pass it toactions/checkout'stoken:input.git pushthen runs as the App identity, and that IS allowed to trigger downstream workflows.Applied to
_claude-mention.ymland_claude-issue-to-pr.yml. Review reusable doesn't push commits, unchanged.Permission prereq before merge
Warning
The
HarperFast AI WorkflowsApp currently hasMembers: Readonly. This change requires:Contents: Writeon consumer repos (forgit push)Pull requests: Write(for the agent'sgh pr create)Without the upgrade, the mint step will fail and the agent can't push at all. Don't merge this PR until the App permissions are upgraded — otherwise the next consumer pin bump breaks the bot-authoring path entirely.
App settings → Permissions → bump → review and accept the install-permission prompts on each consumer repo.
Test plan
yqparses both modified files cleanly; new step ordering looks correct (mint → checkout → existing flow).@claudemention orclaude-fix:*label run; verify the agent's commit fires Format / Unit / Integration /validate / validatechecks (currently they silently skip).Sibling PR
The
:test-runs-format-check fix split into its own PR for faster ship — no permission prereq there.🤖 Generated with Claude Code