Skip to content

feat(loop): fast-forward local checkout to main after a merge - #62

Merged
robercano-ghbot merged 1 commit into
mainfrom
feat/loop-post-merge-local-sync
Jul 7, 2026
Merged

feat(loop): fast-forward local checkout to main after a merge#62
robercano-ghbot merged 1 commit into
mainfrom
feat/loop-post-merge-local-sync

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

After `merge-ready.sh` merges approved PRs, fast-forward the local checkout to the freshly-merged base so your terminal/IDE shows the latest without a manual pull.

Strictly safe by design (addresses the concern that an agent switching branches on the shared checkout changes what the human sees):

  • Acts only when the checkout is on the base branch with a clean tree
  • Only fast-forwards — never a merge commit, never a branch switch, never clobbers uncommitted work
  • Untracked sandbox device-node masks do not count as changes
  • Any obstacle → skip with a reasoned local_sync JSON line (diverged, dirty, wrong branch, offline)

Guards verified in isolation (skips when off-base / when tracked changes exist). Documented in both pr-loop command files.

🤖 Generated with Claude Code

After merge-ready.sh merges approved PRs, fast-forward the local checkout to the
freshly-merged base so the owner's terminal/IDE shows latest without a manual
pull. Strictly safe: acts only when the checkout is on the base branch with a
clean tree, only fast-forwards (never a merge commit, branch switch, or clobber),
and skips with a reasoned `local_sync` line otherwise. Untracked sandbox masks
don't count as changes. Documented in both pr-loop command files.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NTZEsfFT4mrZpv8CY67Frd
@robercano-ghbot
robercano-ghbot merged commit 7c809ed into main Jul 7, 2026
9 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/loop-post-merge-local-sync branch July 7, 2026 11:06
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.

2 participants