Repository navigation
ci: approve the workflow runs our own dedupe commit leaves waiting - #943
Merged
Merged
Conversation
#935 and #936 sat three days showing "no checks reported on the branch" — the symptom of a run held at `action_required`, which reads as "CI never ran" rather than "CI is blocked". Clearing them by hand is the last manual step in the Dependabot queue. ## It is not a Dependabot policy, which is what I assumed Dependabot's own push runs CI fine. Measured on #935: f89aab3 dependabot's push -> CI success d0c2f52 chore(deps): pnpm dedupe -> CI action_required Only the run for OUR dedupe commit is held. dependabot-dedupe.yml pushing a second commit raises a `synchronize` run attributed to a bot actor, and GitHub holds that for approval. So the thing to automate is narrow and well understood, rather than a blanket "approve Dependabot". The held run is wanted — a merge takes the dedupe commit's SHA, so CI has to pass on THAT commit and not just the one beneath it. Only the approving should stop being manual. ## Why workflow_run and not a schedule Actions minutes are capped at 2,000/month org-wide for private repos (#375). A sweeper polling every 20 minutes is ~2,160 billed minutes a month on its own — more than the CI it exists to unblock, since GitHub bills a minimum of one minute per job. Hanging off the dedupe workflow means this runs only when Dependabot actually opens PRs: a handful of times a week, seconds each. It polls for up to ~2 minutes because dedupe pushes near the end of its own run, so the held run may not exist yet when this fires. If dedupe found nothing to push there is no held run and it exits quietly on the first pass. ## Scope, deliberately narrow `if: startsWith(github.event.workflow_run.head_branch, 'dependabot/')`. This cannot approve a held run on a human branch. That is the property that makes removing a manual gate defensible: what gets approved is a lockfile dedupe of a bot's own branch, on which CI has already passed one commit earlier. ## What is NOT verified Whether GITHUB_TOKEN has authority to approve a run here. The endpoint works — I approved four by hand with my own token — but that proves the call, not the token. There are no held runs to test against now that #935 and #936 are merged. So a refusal fails the job loudly and names the fix (a PAT with `actions: write`) rather than passing with nothing approved. A silent no-op approver would be the same defect class as the `continue-on-error: true` in #921 and the path filter in #929: a gate that cannot do its job and does not say so. Monday's Dependabot wave is the real test. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
#935 and #936 sat three days showing "no checks reported on the branch" — the symptom of a run held at
action_required, which reads as "CI never ran" rather than "CI is blocked". Clearing those by hand is the last manual step in the Dependabot queue.It is not a Dependabot policy, which is what I assumed
Dependabot's own push runs CI fine. Measured on #935:
f89aab3de— dependabot's pushd0c2f52fd—chore(deps): pnpm dedupeOnly the run for our dedupe commit is held.
dependabot-dedupe.ymlpushing a second commit raises asynchronizerun attributed to a bot actor, and GitHub holds that for approval.That is a much narrower thing to automate than "approve Dependabot", and it means the blanket auto-approve I offered would have been aimed at the wrong target.
The held run is wanted — a merge takes the dedupe commit's SHA, so CI has to pass on that commit and not just the one beneath it. Only the approving should stop being manual.
Why
workflow_runand not a scheduleActions minutes are capped at 2,000/month org-wide for private repos (#375), and GitHub bills a minimum of one minute per job. A sweeper polling every 20 minutes is ~2,160 billed minutes a month on its own — more than the CI it exists to unblock.
Hanging off the dedupe workflow means this runs only when Dependabot actually opens PRs: a handful of times a week, seconds each.
It polls for up to ~2 minutes because dedupe pushes near the end of its own run, so the held run may not exist yet when this fires. If dedupe found nothing to push, there is no held run and it exits quietly on the first pass.
Scope, deliberately narrow
This cannot approve a held run on a human branch. That is the property that makes removing a manual gate defensible: what gets approved is a lockfile dedupe of a bot's own branch, on which CI has already passed one commit earlier.
What is NOT verified
Whether
GITHUB_TOKENhas authority to approve a run here. The endpoint and the query both work — I approved four held runs by hand earlier with my own token, and the listing query returns cleanly — but that proves the call, not the token. There are no held runs left to test against now that #935 and #936 are merged.So a refusal fails the job loudly and names the fix (a PAT with
actions: write) rather than passing with nothing approved:That matters because a silent no-op approver is the same defect class as the
continue-on-error: truein #921 and the path filter in #929 — a gate that cannot do its job and does not say so. Twice this session I shipped exactly that and only caught it by trying to defeat the check.Monday's Dependabot wave is the real test. If the queue clears without anyone touching it, it worked; if the job goes red with that error, it needs a PAT.
Verification
run:block passesbash -n.pnpm prepushgreen.🤖 Generated with Claude Code