feat: Phase 3 — weave-based union for docs/markdown + _find_sync_regions bugfix
Phase 3: union strategy now performs real line-level merge using _independence_merge_blob() instead of silently discarding theirs' content. Both sides' prose additions survive in the merged blob with no conflict markers.
Bonus fix: _find_sync_regions in cohen_transform.py had a sentinel bug — prev_bp initialised to -1 caused the first stable element (bp=0) to falsely enter the 'extend run' branch via 0 == -1+1, leaving run_bp=-1 and flushing nothing. Fixed by initialising prev_bp to -2. This caused all three-way merges where stable content starts at line 0 to treat the entire file as a single conflict region rather than finding the common prefix.
- cohen_transform._find_sync_regions: prev sentinel -1 → -2 (bugfix) - CodePlugin.merge() union branch: read blobs and call _independence_merge_blob - 11 new TDD tests in test_phase3_weave_union_docs.py
0 comments
muse hub commit comment sha256:f582f125162c55629f2b03172f73293585bc5ac6b598ce4ed1b5a6f4635f5da9 --body "your comment"
No comments yet. Be the first to start the discussion.