gabriel / muse public
test phase5 task/phase1-merge-engine #9 / 16
AI Agent gabriel · 13 hours ago · Jun 11, 2026 · Diff

test(phase5): phantom conflict guard unit tests for all four locations

PG_01-08 + 7 guard-proof sub-tests covering: - detect_conflicts() explicit ours_id != theirs_id guard - CodePlugin.merge() l == r guard - ops_commute() ReplaceOp convergent (same new_content_id) guard - CodePlugin.merge_ops() Step 1/1.5 convergent exclusion - musehub merge_overlay/weave/replay convergent ConflictEntry guard

Audit finding: all four locations already have the guard in equivalent form; no code changes needed. Tests provide direct regression coverage so a future change to any guard is caught at the unit level rather than through multi- layer integration failures.

sha256:03f9550f64e06b3df5753fbb3dfde079ce726f56375ebd4662178f3e33d33d96 sha
+36 symbols
sha256:297b524859f21bd7afaa0c1cf2a4fa9ff461cfffe9177692b2dc497768bcaf2c snapshot
+36
symbols added
0
dead code introduced
Semantic Changes 36 symbols
~ tests/test_phase5_phantom_guard.py .py 36 symbols added
+ TestCodePluginMergeGuard class class TestCodePluginMergeGuard L92–138
+ test_PG_02_same_object_id_not_conflicted method method test_PG_02_same_object_id_not_conflicted L95–119
+ test_PG_02b_real_divergence_still_conflicts method method test_PG_02b_real_divergence_still_conflicts L121–138
+ TestDetectConflictsGuard class class TestDetectConflictsGuard L43–85
+ test_PG_01_convergent_same_id_not_in_conflicts method method test_PG_01_convergent_same_id_not_in_conflicts L46–73
+ test_PG_01b_all_convergent_returns_empty method method test_PG_01b_all_convergent_returns_empty L75–85
+ TestMergeOpsStep15ExplicitGuard class class TestMergeOpsStep15ExplicitGuard L267–326
+ test_PG_05_step15_excludes_convergent_path method method test_PG_05_step15_excludes_convergent_path L270–326
+ TestMergeOpsStep1Guard class class TestMergeOpsStep1Guard L196–260
+ _init_repo method method _init_repo L199–214
+ _write_obj method method _write_obj L216–219
+ test_PG_04_merge_ops_convergent_file_no_symbol_conflict method method test_PG_04_merge_ops_convergent_file_no_symbol_conflict L221–260
+ TestMusehubOverlayGuard class class TestMusehubOverlayGuard L333–378
+ test_PG_06_overlay_convergent_no_conflict_entry method method test_PG_06_overlay_convergent_no_conflict_entry L336–359
+ test_PG_06b_overlay_divergent_creates_entry method method test_PG_06b_overlay_divergent_creates_entry L361–378
+ TestMusehubReplayGuard class class TestMusehubReplayGuard L436–478
+ test_PG_08_replay_convergent_no_conflict_entry method method test_PG_08_replay_convergent_no_conflict_entry L439–461
+ test_PG_08b_replay_divergent_creates_entry method method test_PG_08b_replay_divergent_creates_entry L463–478
+ TestMusehubWeaveGuard class class TestMusehubWeaveGuard L385–429
+ test_PG_07_weave_convergent_no_conflict_entry method method test_PG_07_weave_convergent_no_conflict_entry L388–412
+ test_PG_07b_weave_divergent_creates_entry method method test_PG_07b_weave_divergent_creates_entry L414–429
+ TestOpsCommuteConvergentGuard class class TestOpsCommuteConvergentGuard L145–189
+ test_PG_03_replace_same_new_content_id_commutes method method test_PG_03_replace_same_new_content_id_commutes L148–163
+ test_PG_03b_replace_different_new_content_id_conflicts method method test_PG_03b_replace_different_new_content_id_conflicts L165–176
+ test_PG_03c_replace_different_address_commutes method method test_PG_03c_replace_different_address_commutes L178–189
+ annotations import import annotations L27–27
+ blob_id import import blob_id L34–34
+ datetime import import datetime L29–29
+ fake_id import import fake_id L34–34
+ heads_dir import import heads_dir L36–36
+ json import import json L30–30
+ muse_dir import import muse_dir L36–36
+ pathlib import import pathlib L31–31
+ pytest import import pytest L32–32
+ ref_path import import ref_path L36–36
+ write_object import import write_object L35–35

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:03f9550f64e06b3df5753fbb3dfde079ce726f56375ebd4662178f3e33d33d96 --body "your comment"