Skip to content

ci: auto-sync dev from main after every prod merge - #1375

Merged
Flotapponnier merged 1 commit into
mainfrom
chore/auto-sync-dev-from-main
Jul 24, 2026
Merged

ci: auto-sync dev from main after every prod merge#1375
Flotapponnier merged 1 commit into
mainfrom
chore/auto-sync-dev-from-main

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

What

New GitHub Action .github/workflows/sync-dev-from-main.yml. On every push to `main`:

  1. Fast-forwards `dev` to `main` if possible → done.
  2. Real merge commit if git can auto-resolve → pushed straight to `dev`.
  3. Auto-opens PR `sync/main-to-dev-` against `dev` when git can't resolve → human resolves + merges.

Why

AGENTS.md already says "immediately fast-forward dev from main after a hotfix" but the step got skipped often enough for `dev` to drift 111 commits behind `main`. This bot enforces it going forward — the divergence stops accumulating.

Does NOT touch the current divergence (that's a separate cleanup PR, sync week TBD).

Notes

  • Runs on `push: [main]` + manual dispatch.
  • Uses default `GITHUB_TOKEN` (no PAT needed) — permissions granted via `permissions:` block.
  • Concurrency-locked to prevent overlapping runs.
  • Bot commits authored as `ocb-sync-bot`.

Enforces AGENTS.md fast-forward rule. Every push on main triggers:
1. ff dev to main if possible
2. real merge commit if ff isn't possible but git can resolve
3. auto-PR sync/main-to-dev-<sha> if git can't resolve conflicts

Stops the divergence-drift pattern that put dev 111 commits behind main.
@Flotapponnier
Flotapponnier merged commit 94a61b3 into main Jul 24, 2026
1 check failed
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