fix(conflict): stage resolved files before checking for remaining conflicts#355
Merged
fix(conflict): stage resolved files before checking for remaining conflicts#355
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #355 +/- ##
==========================================
- Coverage 92.97% 92.96% -0.01%
==========================================
Files 194 194
Lines 19855 19856 +1
Branches 3118 3118
==========================================
Hits 18460 18460
- Misses 1361 1362 +1
Partials 34 34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The conflict-resolver agent successfully removes conflict markers from files, but git still reports them as "Unmerged" because the agent doesn't
git addthe resolved files. The post-agent check usesgit diff --name-only --diff-filter=U, which only clears when files are staged — so it always reports all files as unresolved even when the content is clean.Confirmed on TAAD issues #20 (7 files) and #25 (6 files): all files had 0 conflict markers but were still listed as "both modified" / unmerged.
Fix
Stage the conflicted files with
git addafter the agent runs and before checking for remaining conflicts. Files with real remaining conflict markers will fail to stage (git rejects staging files with markers), so the check still catches genuinely unresolved files.