Skip to content

[codex] Refresh trunk before sync restack#38

Merged
mark-pro merged 2 commits intomainfrom
codex/sync-refresh-trunk
Apr 26, 2026
Merged

[codex] Refresh trunk before sync restack#38
mark-pro merged 2 commits intomainfrom
codex/sync-refresh-trunk

Conversation

@mark-pro
Copy link
Copy Markdown
Member

Summary

Refresh sync so it updates the configured trunk branch before the existing repair, cleanup, and restack flow continues.

What Changed

  • add a sync preflight trunk refresh step that captures the original branch, switches to trunk, and runs git pull --rebase
  • abort trunk-refresh rebase state and restore the starting branch if that preflight fails
  • add a dedicated RefreshingTrunk sync status and render coverage
  • expand sync smoke tests for trunk refresh success, preflight failure cleanup, and existing remote cleanup / PR repair flows

Why

sync was restacking against stale local trunk state, which meant remote trunk updates were not consistently reflected before the normal restack plan ran.

Validation

  • rustup run stable cargo fmt --all
  • cargo check
  • cargo test

@mark-pro mark-pro marked this pull request as ready for review April 26, 2026 16:48
@mark-pro mark-pro merged commit 6454cf8 into main Apr 26, 2026
2 checks passed
@mark-pro mark-pro deleted the codex/sync-refresh-trunk branch April 26, 2026 17:05
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