Skip to content

fix(ci): improve conflict resolver prompt to prevent bad merge commits#26699

Merged
keithwillcode merged 1 commit intomainfrom
devin/conflict-resolver-prompt-fix-1768069373
Jan 10, 2026
Merged

fix(ci): improve conflict resolver prompt to prevent bad merge commits#26699
keithwillcode merged 1 commit intomainfrom
devin/conflict-resolver-prompt-fix-1768069373

Conversation

@keithwillcode
Copy link
Contributor

What does this PR do?

Fixes an issue where the Devin conflict resolver was creating merge commits that reproduced all changes from the target branch instead of properly merging them. This was observed in PR #26117 where the merge commit showed thousands of file changes that were already in main.

Changes:

  • Removed explicit git commands from the prompt to avoid Devin misinterpreting them
  • Added a validation step requiring Devin to check git diff --stat HEAD^1...HEAD and HEAD^2...HEAD before pushing
  • Added explicit rule to never reproduce/recreate changes from the target branch

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - workflow change only.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

This is a prompt change for the Devin conflict resolver workflow. To test:

  1. Wait for a PR to have merge conflicts
  2. Let the workflow trigger a Devin session
  3. Verify Devin performs the validation step before pushing
  4. Verify the resulting merge commit only contains conflict resolutions, not reproduced changes from main

Human Review Checklist

  • Verify the validation logic using HEAD^1 (PR branch parent) and HEAD^2 (base branch parent) is correct for detecting bad merges
  • Consider if the instructions might cause false positives on legitimate large conflict resolutions

Checklist

  • I have read the contributing guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings

Link to Devin run: https://app.devin.ai/sessions/26e3a13396064e4b871cbf0dd00ffcb0
Requested by: @keithwillcode

- Remove explicit git commands from the prompt to avoid Devin reproducing changes
- Add validation step before pushing to detect if merge commit incorrectly includes changes from target branch
- Add guidance to use git's merge functionality properly instead of manually copying content
- Add rule to never reproduce or recreate changes from the target branch

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@keithwillcode keithwillcode self-assigned this Jan 10, 2026
@keithwillcode keithwillcode added this to the v6.1 milestone Jan 10, 2026
@keithwillcode keithwillcode marked this pull request as ready for review January 10, 2026 18:25
@keithwillcode keithwillcode requested a review from a team as a code owner January 10, 2026 18:25
@graphite-app graphite-app bot added core area: core, team members only foundation labels Jan 10, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@keithwillcode keithwillcode enabled auto-merge (squash) January 10, 2026 18:29
Copy link
Contributor

@anikdhabal anikdhabal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@keithwillcode
Copy link
Contributor Author

Bypassing Foundation codeowner as I am part of Foundation, we have an approver and this change is low risk.

@keithwillcode keithwillcode merged commit 9c4ed1a into main Jan 10, 2026
73 of 79 checks passed
@keithwillcode keithwillcode deleted the devin/conflict-resolver-prompt-fix-1768069373 branch January 10, 2026 18:33
Anshumancanrock pushed a commit to Anshumancanrock/cal.com that referenced this pull request Jan 12, 2026
calcom#26699)

- Remove explicit git commands from the prompt to avoid Devin reproducing changes
- Add validation step before pushing to detect if merge commit incorrectly includes changes from target branch
- Add guidance to use git's merge functionality properly instead of manually copying content
- Add rule to never reproduce or recreate changes from the target branch

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – cal-companion January 13, 2026 08:22 Inactive
@vercel vercel bot temporarily deployed to Preview – dev January 13, 2026 08:22 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants