Skip to content

fix: handle conflifing suggestions#21

Open
panasheMuriro wants to merge 2 commits into
canonical:mainfrom
panasheMuriro:handle-conflicting-suggestions
Open

fix: handle conflifing suggestions#21
panasheMuriro wants to merge 2 commits into
canonical:mainfrom
panasheMuriro:handle-conflicting-suggestions

Conversation

@panasheMuriro
Copy link
Copy Markdown

@panasheMuriro panasheMuriro commented Feb 12, 2026

Done

  • Added helper functions to handle conflicting suggestions
    • The current conflict logic favors the bigger suggested change. Here is example scenario:
      • A suggests modifying a word in a section, B suggests deleting the same entire section -> Delete from B is bigger, therefore delete wins. A's suggestion is discarded

QA

Prerequisites

  • A copy doc with conflicting suggestions made by separate accounts such as a minor replacement in a section and a deletion of that entire section (example doc)
    • Invite the bauer bot account to the copy doc
  • The repo where the changes should be applied

Steps

  • Checkout this branch
  • Build the bauer executable with task build
  • Run {bauer executable path}/bauer --doc-id <doc_id> --credentials <credentials> --github-repo <github_repo> in the terminal
  • Verify that the deletion of the section happens (example PR: https://github.com/panasheMuriro/ubuntu.com/pull/2)

Jira

Fixes WD-33589

Future Development

  • Investigate more edge cases of conflicting suggestions and handle them

@panasheMuriro panasheMuriro self-assigned this Feb 12, 2026
@panasheMuriro panasheMuriro marked this pull request as ready for review February 13, 2026 16:04
Copy link
Copy Markdown
Contributor

@britneywwc britneywwc left a comment

Choose a reason for hiding this comment

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

QA passes and code looks good overall! Thanks for adding the tests as well. I requested edit access to your doc because I wasn't able to see the suggestion for deleting the section

@britneywwc
Copy link
Copy Markdown
Contributor

@panasheMuriro I tested it with one of the edge cases in the ticket: replacing text, then deleting the section. The suggestions are on the same doc and this is the PR.
It is only picking up the replace changes, even when the grouped size for deleting should be bigger.

@panasheMuriro
Copy link
Copy Markdown
Author

Then something is off. I will look at this next week when i find time.

@britneywwc
Copy link
Copy Markdown
Contributor

Sounds good, thanks @panasheMuriro!

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