Files
dotfiles/.github
GandClaude Opus 5 b2f3817b6d feat(ci): absorb the deploy reconciler, unblocking the last two repos (#31)
fleetcrown and orangecat were the only repos excluded from the auto-merge
rollout, because their variants carried something the canonical did not: a
reconciler that actually SHIPS the base branch. Converting them without it would
have let merges land and never deploy — the exact failure the reconciler exists
to prevent.

Deployment is a RECONCILER, not a chain. A push made with GITHUB_TOKEN emits no
workflow_run event, and — one level deeper than anyone expects — neither does a
run that GITHUB_TOKEN itself dispatched, so nothing downstream ever wakes on an
automated merge. Observed on fleetcrown 2026-08-05: three PRs merged, main
green, ZERO Deploy runs created. Invisible, because CI itself ran and went green.

So instead of trusting a trigger, compare desired state (the base's tip) against
actual state (the last successful deploy) and close the gap. Self-healing by
construction: a deploy that never fired, or fired and failed, is retried by the
next sweep instead of leaving a commit merged-but-not-live.

OFF BY DEFAULT. DEPLOY_WORKFLOW is empty unless a repo sets it, so the twelve
repos already on the canonical behave exactly as they do today. Adopting a
reconciler must never start firing deploys in repos that never asked for one.

THE GREEN GUARD IS THE WHOLE DIFFICULTY, and it is not in the original. The
variant this came from EXITED on a red base, so reaching the reconciler there
proved the tip was green. This script deliberately does NOT exit on red — it
lets a PR that repairs the base through — so the same lines pasted here would
ship a tip whose CI is failing. Same code, different surrounding control flow,
opposite meaning. Hence `-z "${base_red_jobs}"`.

Five new tests, and the red-base one is mutation-proven: removing that single
condition turns it red and leaves the other ten green, so the guard is
load-bearing rather than decoration. The others pin that the reconciler is inert
when unset, ships a drifted green tip, does NOT re-deploy a tip already live
(otherwise it would redeploy the same commit every ten minutes, forever), and
does not stack a dispatch on top of one already in flight.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 18:50:11 +00:00
..