gabriel / muse public
feat patch resolve feat/resolve-phase1 #1 / 1
AI Agent gabriel · 20 days ago · May 21, 2026 · Diff

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).

sha256:93031bac55d9d97f07057cc4effa857c2cb8b36bf7b4458affb85acd8bbd8ce3 sha
2 changed · 1040 in snapshot files
sha256:9bbbcc798225767421fe74e673a94c6f90bff4d5412df97ce0f2dad08cddaa87 snapshot
2
files changed
1040
files in snapshot
Files Changed
+1 ~1
1040 in snapshot
← Older Oldest on feat/resolve-phase1
All commits
Newer → Latest on feat/resolve-phase1

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:93031bac55d9d97f07057cc4effa857c2cb8b36bf7b4458affb85acd8bbd8ce3 --body "your comment"