gabriel / muse public
fix merge dev
AI Agent gabriel · 113 days ago · May 26, 2026 · Diff

fix(merge): write Cohen Transform conflict markers to working tree

When muse merge detected a conflict, conflicting files were left at their ours version with no markers — making it impossible to see both sides of the conflict. Fixed by running three_way_merge_lines (the Cohen Transform) over the ours/theirs/base blobs from the object store and writing the diff3-style marker output to the working tree, matching the pattern already used in checkout.py. Binary files are left at ours.

Also corrects test_conflicting_file_left_at_ours_version_on_conflict which was asserting the buggy behavior.

sha256:681cefc30edc150defde5affbfae111caa9bca1282b6f1662f08dd1f0bf5ca5b sha
+30 ~2 −1 symbols
sha256:0ded11a6c78814ec95926978ece5e9dac6b3f9ee4feada182c44c3e2dc78077c snapshot
+30
symbols added
~2
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes 33 symbols
~ tests/test_merge_conflict_markers.py .py 29 symbols added
+ Manifest variable variable Manifest L23–23
+ TestConflictMarkersWrittenToWorkingTree class class TestConflictMarkersWrittenToWorkingTree L108–315
+ test_binary_conflict_file_not_garbled method method test_binary_conflict_file_not_garbled L242–266
+ test_conflict_file_contains_base_content method method test_conflict_file_contains_base_content L198–213
+ test_conflict_file_contains_end_marker method method test_conflict_file_contains_end_marker L147–162
+ test_conflict_file_contains_ours_content method method test_conflict_file_contains_ours_content L164–179
+ test_conflict_file_contains_ours_marker method method test_conflict_file_contains_ours_marker L111–128
+ test_conflict_file_contains_theirs_content method method test_conflict_file_contains_theirs_content L181–196
+ test_conflict_file_contains_theirs_separator method method test_conflict_file_contains_theirs_separator L130–145
+ test_merge_state_still_records_conflict_path method method test_merge_state_still_records_conflict_path L268–287
+ test_multi_file_conflict_all_files_get_markers method method test_multi_file_conflict_all_files_get_markers L289–315
+ test_non_conflicting_file_has_no_markers method method test_non_conflicting_file_has_no_markers L215–240
+ _env function function _env L99–100
+ _init_repo function function _init_repo L34–50
+ _make_commit function function _make_commit L59–96
+ _write_blob function function _write_blob L53–56
+ cli variable variable cli L26–26
+ CliRunner import import CliRunner L18–18
+ annotations import import annotations L11–11
+ blob_id import import blob_id L19–19
+ datetime import import datetime L13–13
+ heads_dir import import heads_dir L21–21
+ json import import json L14–14
+ muse_dir import import muse_dir L21–21
+ pathlib import import pathlib L15–15
+ pytest import import pytest L17–17
+ ref_path import import ref_path L21–21
+ write_object import import write_object L20–20
+ runner variable variable runner L25–25
~ muse/cli/commands/merge.py .py 1 symbol modified
~ tests/test_cmd_merge.py .py 1 symbol added, 1 symbol removed, 1 symbol modified
test_conflicting_file_left_at_ours_version_on_conflict method method test_conflicting_file_left_at_ours_version_on_conflict L259–295
+ test_conflicting_file_gets_conflict_markers method method test_conflicting_file_gets_conflict_markers L259–298
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:681cefc30edc150defde5affbfae111caa9bca1282b6f1662f08dd1f0bf5ca5b --body "your comment"