Skip to content

feat(workflow): bot-pushed commits should retrigger downstream CI - #18

Draft
heskew wants to merge 1 commit into
mainfrom
workflow/test-format-check
Draft

feat(workflow): bot-pushed commits should retrigger downstream CI#18
heskew wants to merge 1 commit into
mainfrom
workflow/test-format-check

Conversation

@heskew

@heskew heskew commented May 7, 2026

Copy link
Copy Markdown
Member

Summary

git push from the agent step uses the default GITHUB_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, and validate / validate all silently skip the bot's commit. Hit on harper #490 today.

Fix: mint a write-scoped installation token from the existing 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 before merge

Warning

The HarperFast AI Workflows App currently has Members: Read only. This change requires:

  • Contents: Write on consumer repos (for git push)
  • Pull requests: Write (for the agent's gh 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

  • Validator passes against all three reusables.
  • yq parses both modified files cleanly; new step ordering looks correct (mint → checkout → existing flow).
  • Before merging: upgrade App permissions per above.
  • After merge + consumer pin bumps: open a fresh @claude mention or claude-fix:* label run; verify the agent's commit fires Format / Unit / Integration / validate / validate checks (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

@heskew
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
heskew force-pushed the workflow/test-format-check branch from 8411eb8 to ca1d35d Compare May 7, 2026 15:52
@heskew heskew changed the title feat(workflow): App-token push (retrigger CI) + format:check on :test feat(workflow): bot-pushed commits should retrigger downstream CI May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant