gabriel / muse public
refactor BREAKING task/addressed-merge-plugin #1 / 1
AI Agent gabriel · 104 days ago · May 27, 2026 · Diff

refactor: rename StructuredMergePlugin to AddressedMergePlugin; add AddressedInsertOp/AddressedDeleteOp

Code domain uses Map CRDT semantics (address-keyed, commute on different addresses, Harmony resolves same-address conflicts) — not classical OT. Rename the plugin protocol to reflect this accurately.

- AddressedMergePlugin: new canonical name with corrected docstring - StructuredMergePlugin: backward-compat alias (all isinstance checks work) - AddressedInsertOp / AddressedDeleteOp: no position field — code symbols are name-addressed, not position-indexed in an ordered sequence - InsertOp / DeleteOp: retained with position for sequence domains (MIDI) - LeafDomainOp: extended to include AddressedInsertOp / AddressedDeleteOp - diff_map in core/diff_algorithms: switched to AddressedInsertOp/DeleteOp since map keys are always name-addressed - symbol_diff.py: all ops switched to Addressed variants - Tests: 21 new tests in test_addressed_merge_plugin.py (all green)

sha256:84df9126d09aeec0b8f1b908f0b06c10913feec28f3514b382efb1ba6d619385 sha
+40 ~34 −4 symbols
sha256:f16a0d510823a3bb81fd3cfad8257369e85f96f60ff987605e67f5504aa5e423 snapshot
+40
symbols added
~34
symbols modified
−4
symbols removed
0
dead code introduced
Semantic Changes 78 symbols
~ tests/test_addressed_merge_plugin.py .py 31 symbols added
+ TestAddressedDeleteOp class class TestAddressedDeleteOp L149–193
+ test_C1_importable method method test_C1_importable L150–152
+ test_C2_required_keys method method test_C2_required_keys L154–163
+ test_C3_no_position_key_in_instance method method test_C3_no_position_key_in_instance L165–176
+ test_C4_no_position_in_required_keys method method test_C4_no_position_in_required_keys L178–182
+ test_C5_op_literal method method test_C5_op_literal L184–193
+ TestAddressedInsertOp class class TestAddressedInsertOp L95–142
+ test_B1_importable method method test_B1_importable L96–98
+ test_B2_required_keys method method test_B2_required_keys L100–109
+ test_B3_no_position_key_in_instance method method test_B3_no_position_key_in_instance L111–123
+ test_B4_no_position_in_required_keys method method test_B4_no_position_in_required_keys L125–131
+ test_B5_op_literal method method test_B5_op_literal L133–142
+ TestCodePluginAddressedOps class class TestCodePluginAddressedOps L229–315
+ test_E1_added_file_op_has_no_position method method test_E1_added_file_op_has_no_position L246–258
+ test_E2_removed_file_op_has_no_position method method test_E2_removed_file_op_has_no_position L260–272
+ test_E3_muse_read_json_has_no_position_in_code_ops method method test_E3_muse_read_json_has_no_position_in_code_ops L274–315
+ two_file_repo method method two_file_repo L231–244
+ TestProtocolNaming class class TestProtocolNaming L53–88
+ test_A1_addressed_merge_plugin_importable method method test_A1_addressed_merge_plugin_importable L54–56
+ test_A2_structured_merge_plugin_is_alias method method test_A2_structured_merge_plugin_is_alias L58–64
+ test_A3_code_plugin_satisfies_addressed_merge_plugin method method test_A3_code_plugin_satisfies_addressed_merge_plugin L66–72
+ test_A4_midi_plugin_satisfies_addressed_merge_plugin method method test_A4_midi_plugin_satisfies_addressed_merge_plugin L74–80
+ test_A5_identity_plugin_satisfies_addressed_merge_plugin method method test_A5_identity_plugin_satisfies_addressed_merge_plugin L82–88
+ TestSequenceOpsRetainPosition class class TestSequenceOpsRetainPosition L200–222
+ test_D1_insert_op_has_position method method test_D1_insert_op_has_position L201–207
+ test_D2_delete_op_has_position method method test_D2_delete_op_has_position L209–215
+ test_D3_addressed_and_sequence_insert_are_distinct method method test_D3_addressed_and_sequence_insert_are_distinct L217–222
+ annotations import import annotations L42–42
+ json import import json L44–44
+ pathlib import import pathlib L45–45
+ pytest import import pytest L47–47
~ muse/core/diff_algorithms/__init__.py .py 2 symbols added, 7 symbols modified
+ AddressedDeleteOp import import AddressedDeleteOp L47–47
+ AddressedInsertOp import import AddressedInsertOp L47–47
~ muse/domain.py .py 3 symbols added, 5 symbols modified
+ AddressedDeleteOp class class AddressedDeleteOp L214–224
+ AddressedInsertOp class class AddressedInsertOp L196–212
+ AddressedMergePlugin class class AddressedMergePlugin L664–730
~ muse/plugins/code/plugin.py .py 2 symbols added, 2 symbols removed, 16 symbols modified
DeleteOp import import DeleteOp L110–110
InsertOp import import InsertOp L110–110
+ AddressedDeleteOp import import AddressedDeleteOp L110–110
+ AddressedInsertOp import import AddressedInsertOp L110–110
~ diff
~ muse/plugins/code/symbol_diff.py .py 2 symbols added, 2 symbols removed, 6 symbols modified
DeleteOp import import DeleteOp L59–59
InsertOp import import InsertOp L59–59
+ AddressedDeleteOp import import AddressedDeleteOp L59–59
+ AddressedInsertOp import import AddressedInsertOp L59–59
← Older Oldest on task/addressed-merge-plugin
All commits
Newer → Latest on task/addressed-merge-plugin

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:84df9126d09aeec0b8f1b908f0b06c10913feec28f3514b382efb1ba6d619385 --body "your comment"