Skip to content

ci: promote release branches by fast-forward push - #543

Merged
thedancingdeveloper merged 1 commit into
devfrom
fix/promotion-ff-push
Sep 2, 2026
Merged

ci: promote release branches by fast-forward push#543
thedancingdeveloper merged 1 commit into
devfrom
fix/promotion-ff-push

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Contributor

Why

The release chain (dev → main → prod → tag) is fast-forward-gated, but GitHub has no fast-forward merge method: the rebase-merge promotion PRs rewrote the promoted commits' SHAs on every merge, making the source branch a non-ancestor of the target and deadlocking the next promotion. This has been repaired by hand on every release to date (see the operator note docs/local/RELEASE-PROMOTION-BLOCKER.md).

What

  • promote.yml keeps every existing gate — PROMOTE confirmation, promote-main/promote-prod environments, ancestry check, green ci/runner-policy on the source SHA, verified dev deployment receipt — and ends in a plain fast-forward git push with the workflow token instead of opening a PR. No --force: the server rejects any non-fast-forward even if a gate regressed.
  • main/prod protection moves from classic branch protection to the release-branch-promotion ruleset (restrict updates + deletions + force pushes), whose only bypass actor is the GitHub Actions app. No PR can update a release branch at all.
  • The workflow dispatches the ref-bound pipelines a token push does not trigger: build.yml (branch-scoped sha image tags) and ci.yml on prod (production Android APK). The promoted commit itself keeps the checks it earned on dev — a fast-forward moves the ref to the identical SHA.
  • promotion-policy stays as an early, legible failure for stray PRs into release branches.
  • docs/DEPLOYMENT.md §7.1 rewritten; VOGT_PROMOTION_TOKEN is no longer needed and can be revoked. Stale README note about the once-private vogt package removed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RzFCTnWGff1k4FyX1HQCYM

GitHub has no fast-forward merge method, so the PR-based promotion
rewrote the promoted SHAs on every merge and deadlocked the next
stage's ancestry gate — repaired by hand on every release to date.

promote.yml keeps every gate (PROMOTE confirmation, environment hooks,
ancestry, green source checks, verified dev deployment receipt) and
ends in a plain fast-forward push with the workflow token instead of
opening a PR — REST only, the runner has no gh CLI (#460). main and
prod move from classic branch protection to the release-branch-promotion
ruleset, whose only bypass actor is the Actions app; no other update
path into a release branch exists. The workflow dispatches the
ref-bound pipelines (build.yml, and ci.yml on prod for the production
APK) that a token push does not trigger. The promotion contract test
now pins the push model.

VOGT_PROMOTION_TOKEN is no longer used and can be revoked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RzFCTnWGff1k4FyX1HQCYM
@thedancingdeveloper
thedancingdeveloper merged commit fc62aac into dev Sep 2, 2026
15 checks passed
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