Skip to content

ci: call the central auto-merge sweep instead of carrying a copy - #136

Merged
github-actions[bot] merged 1 commit into
mainfrom
ci/central-automerge
Aug 16, 2026
Merged

ci: call the central auto-merge sweep instead of carrying a copy#136
github-actions[bot] merged 1 commit into
mainfrom
ci/central-automerge

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

auto-merge-sweep.sh was 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:

Variant Fix only it had
evig infra-failure detection + re-run — an Actions incident left main failure with no failed job; 11 PRs stranded ~14h
fleetcrown deadlock naming — a red base with the repairing PR queued looked identical to "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; 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_run must 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_workflows is 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.
  • permissions are 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) — job sweep / sweep green, log confirming it resolved the base and swept.

🤖 Generated with Claude Code

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>
@github-actions
github-actions Bot merged commit a01bed5 into main Aug 16, 2026
2 checks passed
@github-actions
github-actions Bot deleted the ci/central-automerge branch August 16, 2026 14:54
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