Skip to content

Unify PR creation codepaths for conflict/non-conflict syncs.#20

Merged
vorporeal merged 1 commit into
mainfrom
david/unify-conflict-non-conflict-sync-workflow-paths
Apr 10, 2026
Merged

Unify PR creation codepaths for conflict/non-conflict syncs.#20
vorporeal merged 1 commit into
mainfrom
david/unify-conflict-non-conflict-sync-workflow-paths

Conversation

@vorporeal

@vorporeal vorporeal commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Description

Unifies the conflict and non-conflict codepaths in both _sync_private_to_public and _sync_public_to_private.

Previously, a cherry-pick conflict caused the code to branch into a completely separate _handle_cherry_pick_conflict function that duplicated much of the standard flow (description building, trailer appending, push, PR creation). This made it easy for the two paths to drift — most recently, conflict PRs were getting [CONFLICT] prepended to their titles and losing their original PR descriptions.

Now both functions follow a single linear flow with is_conflict conditionals at the points where behavior differs:

  1. Cherry-pick → set is_conflict
  2. Commit handling (raw conflict commit + resolution agent vs. amend)
  3. Build PR description (shared, identical logic)
  4. Append trailers (origin always; conflict trailer only if conflict)
  5. Push + create PR
  6. Post-creation conflict steps if needed (label, reviewer, comment, slack)

Other changes:

  • Conflict PRs no longer get [CONFLICT] prepended to their title.
  • Conflict PRs now preserve the original description (source PR body or agent-generated) instead of replacing it with a generic conflict message.
  • A comment is posted on conflict PRs noting the reviewer assignment, rather than baking that info into the PR body.
  • Added GhOps.add_pr_comment() method.

Testing

All 251 existing tests pass. Verified via manual inspection of a conflict sync PR (warpdotdev/warp-internal#24195).

Co-Authored-By: Oz oz-agent@warp.dev

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vorporeal vorporeal requested a review from danielpeng2 April 9, 2026 15:56
@vorporeal vorporeal marked this pull request as ready for review April 9, 2026 15:56
@vorporeal vorporeal force-pushed the david/unify-conflict-non-conflict-sync-workflow-paths branch from 2be06eb to 728e168 Compare April 10, 2026 16:37
@vorporeal vorporeal merged commit bcabfb7 into main Apr 10, 2026
1 check passed
@vorporeal vorporeal deleted the david/unify-conflict-non-conflict-sync-workflow-paths branch April 10, 2026 16:38
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