feat(resolve): Phase 1 — resolve_path and resolve_symbol MERGE_STATE primitives (issue #8)
Add two mutation primitives to muse/core/merge_engine.py:
- resolve_path(root, path) -> list[str]: removes all conflict_paths entries whose file portion matches path (supports both plain paths and path::symbol entries); returns list of cleared addresses; idempotent - resolve_symbol(root, symbol_address) -> str: removes exactly one entry from conflict_paths by exact address match; returns True if found, False if already absent; idempotent
Both functions: - never mutate original_conflict_paths (Harmony reads it at commit time) - preserve all other MERGE_STATE fields (commit refs, branch name) - raise ValueError when no merge is in progress - use _write_conflict_paths() helper for atomic MERGE_STATE persistence
20 tests covering path resolution, symbol resolution, idempotency, original_conflict_paths immutability, field preservation, and edge cases (prefix collisions, last-entry resolution, multi-resolve sequences).
Files Changed
+1
~1
1040 in snapshot
0 comments
muse hub commit comment sha256:93031bac55d9d97f07057cc4effa857c2cb8b36bf7b4458affb85acd8bbd8ce3 --body "your comment"
No comments yet. Be the first to start the discussion.