ci: call the central auto-merge sweep instead of carrying a copy - #136
Merged
Conversation
auto-merge-sweep.sh was copied into 22 repos and drifted into EIGHT distinct
versions, 245 to 404 lines. Three of them independently grew different fixes for
real outages, and each fix reached only the repo that wrote it:
evig, revampit infra-failure detection + re-run. An Actions incident left
main "failure" with no failed job at all; 11 PRs stranded
for roughly 14 hours.
fleetcrown DEADLOCK naming — a red base with the repairing PR sitting in
the queue was indistinguishable from "nothing to merge".
the other 19 neither.
Nothing could carry a fix across, so every repo waited to hit each outage
itself. This repo now calls the canonical sweep in maonakamoto/dotfiles, and the
local copy is deleted.
The canonical is the union of the three, built on the variant ten repos were
already running rather than on the longest one — the 404-line variant is missing
the step-summary reporting the 296-line one has, so "take the biggest file"
would have silently deleted working behaviour. The merge was 106 insertions and
zero deletions: nothing can be lost by adopting it.
The triggers stay in this file because they genuinely are per-repo: workflow_run
must name the CI workflow exactly, and that name differs across the fleet.
Two details that are silent when wrong, both found by piloting rather than
reasoning:
rearm_workflows is SPACE-separated. The sweep word-splits it; a comma makes
one bogus token, every dispatch fails, and the only symptom is that nothing
deploys — while the sweep still exits 0 and reports a successful merge.
permissions are declared on the CALLER as well. A called workflow's token is
capped by what the caller grants, so relying on the callee's block alone can
hand it a read-only token; the sweep would then merge nothing while exiting 0,
which is indistinguishable from having nothing to merge.
Verified before this rollout: the canonical ran end to end in dotfiles' own CI,
and the reusable-workflow path ran end to end in the pilot repo (s-ink).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
auto-merge-sweep.shwas copied into 22 repos and drifted into 8 distinct versions, 245–404 lines. Three independently grew different fixes for real outages, and each fix reached only the repo that wrote it:mainfailurewith no failed job; 11 PRs stranded ~14hNothing could carry a fix across, so every repo waited to hit each outage itself. This repo now calls the canonical sweep in
maonakamoto/dotfiles; the local copy is deleted.The canonical is a union, not "the biggest file"
It is built on the variant ten repos were already running, with the two outage fixes spliced in — not on the longest one. The 404-line variant lacks the step-summary reporting the 296-line one has, so picking by size would have silently deleted working behaviour. The merge was 106 insertions, zero deletions: nothing can be lost by adopting it.
What stays local, and why
The triggers.
workflow_runmust name the CI workflow exactly, and that name differs across the fleet — so this file is now settings, not logic.Two details that are silent when wrong
Both found by piloting a real repo rather than reasoning about it:
rearm_workflowsis space-separated. The sweep word-splits it; a comma becomes one bogus token, every dispatch fails, and the only symptom is nothing deploys — while the sweep still exits 0 and reports a successful merge.permissionsare declared on the caller too. A called workflow's token is capped by what the caller grants, so relying on the callee's block alone can hand it a read-only token; the sweep would then merge nothing while exiting 0 — indistinguishable from having nothing to merge.Verification before this rollout
The canonical ran end to end in dotfiles' own CI, and the reusable-workflow path ran end to end in the pilot repo (
s-ink) — jobsweep / sweepgreen, log confirming it resolved the base and swept.🤖 Generated with Claude Code