fix(ci): stop the auto-heal loop stranding every npm Dependabot PR - #236
Merged
Merged
Conversation
added 2 commits
August 2, 2026 06:17
The heal commit that recomputes the fetchYarnDeps hash caused three separate failures, and together they deadlocked PRs #227 to #235. Dependabot stops rebasing a PR as soon as a third party pushes a commit to it. The heal commit is that push. Once #228 merged, the seven remaining npm PRs conflicted and nothing ever cleared them. The heal commit message now carries [dependabot skip], the documented marker that lets Dependabot force-push a rebase over it. Every npm PR rewrites yarn.lock and the same fetchYarnDeps hash line in flake.nix, so two open npm PRs always conflict. A catch-all group puts every npm version update in one PR and removes the race. Security updates keep their own PRs, because the group is scoped to version-updates. A push made with the default GITHUB_TOKEN never starts another workflow run, so the healed head commit carried zero checks. The checkout and merge steps now read AUTOHEAL_TOKEN and fall back to GITHUB_TOKEN when it is unset. The header documents that it has to be a Dependabot secret. Drop the gh pr merge --auto fallback. GitHub refuses to arm auto-merge on a branch with no merge requirement, and development has neither a required check nor a required review, so the call always failed the job. A conflict is now logged and passes, because Dependabot rebases it.
batch-deps ran yarn upgrade every Monday and pushed package.json, yarn.lock and flake.nix straight to development. Dependabot npm runs weekly against the same three files. Two updaters on one lockfile mean that every Monday push turned each open npm PR dirty. The catch-all npm group now does the same job through a reviewed PR with real CI. batch-deps pushed to the default branch with no review at all, which its own header called out as the trade it accepted.
This was referenced Aug 2, 2026
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.
Seven npm Dependabot PRs (#227, #229 to #235) are stuck and cannot merge. The auto-heal workflow is not failing to run. It heals every PR, proves the build is green, and then dies at the merge step. Four causes stack up.
1. The heal commit stops the Dependabot rebase
Dependabot stops rebasing a pull request as soon as a third party pushes a commit to it. The
build(flake): recompute fetchYarnDeps hashcommit is that push. #228 merged at 21:39 on 1 August, the seven siblings conflicted inside the same minute, and nothing ever cleared them.Fix: the heal commit message now carries
[dependabot skip], the documented marker that lets Dependabot force-push a rebase over a third-party commit.2. Every npm PR fights every other npm PR
Each one rewrites
yarn.lockand the same singlehash =line inflake.nix. Two open npm PRs are never clean at the same time.Fix: a catch-all group puts every npm version update in one PR. That removes the race, and it cuts the cost from one full nix build per package to one per week.
applies-to: version-updateskeeps security updates on their own PRs.3. The healed head commit carries no checks
A push made with the default
GITHUB_TOKENnever starts another workflow run.commits/<branch>/check-runsreturnstotal_count: 0on all seven PRs.batch-deps.ymldocumented this exact trap in its own header, and the heal workflow repeated it.Fix: the checkout and merge steps read
secrets.AUTOHEAL_TOKENand fall back toGITHUB_TOKENwhen it is unset. It has to be stored as a Dependabot secret, because a Dependabot-triggered run cannot read Actions secrets. The workflow header explains this.4. The
--autofallback can never armGitHub refuses to arm auto-merge on a branch with no merge requirement.
developmenthas neither a required status check nor a required review, so the call failed the job on every conflicting PR.Fix: drop the fallback. A conflict is now logged and passes, because Dependabot rebases it.
batch-deps removal
batch-deps.ymlranyarn upgradeevery Monday and pushedpackage.json,yarn.lockandflake.nixstraight todevelopment. Dependabot npm runs weekly against the same three files. Two updaters on one lockfile meant every Monday push turned each open npm PR dirty. The catch-all group now does that job through a reviewed PR with real CI.After merge
Do not close the seven stuck PRs by hand. A manual close stops Dependabot recreating that version. Comment
@dependabot recreateon them instead, or let the next weekly run supersede them with the grouped PR.Checks run
actionlintwith shellcheck exits 0. Both YAML files parse.