gabriel / muse public
feat muse#83 feat/snapshot-content-id-migration #2 / 4
AI Agent gabriel · 10 days ago · Jul 7, 2026 · Diff

feat(muse#83): Phase 3 -- ref/reflog integration, full orchestrator

migrate_snapshot_content_and_cascade() composes Phase 1 + Phase 2 with muse.core.migrate's existing, already-tested generic ref/reflog passes (_migrate_refs/_migrate_remote_refs/_migrate_reflogs), reused unchanged -- no new rewrite logic, per the plan doc's design.

5 tests proving the composition is wired correctly: a branch head pointing at a rewritten commit resolves to the new ID (RF_01), an untouched branch ref is byte-identical (RF_02), remote-tracking refs update the same way (RF_03), reflog entries are rewritten selectively -- old superseded IDs never remain (RF_04), and the composed orchestrator's result matches running Phase 1 + Phase 2 independently (RF_05).

Full regression sweep: 213 passed (this module's 17 new tests + the existing migrate.py/migrate_object_store/migrate_force_resign/ migrate_domain_integers suites, unaffected).

sha256:f939f31fe6bbe78952c7591070c25a449f8aa4a56f4502bcecc20424183a27ab sha
+31 symbols
sha256:ce09cbefe346d0cc7230fd66c5c57dfd308eaf2278e56821d0ecae8fc898b549 snapshot
+31
symbols added
0
dead code introduced
Semantic Changes 31 symbols
+ _AT_ISO variable variable _AT_ISO L26–26
+ _build_chain function function _build_chain L75–103
+ _make_identity function function _make_identity L36–37
+ _sign function function _sign L40–42
+ _write_unified_commit function function _write_unified_commit L45–61
+ _write_unified_snapshot function function _write_unified_snapshot L64–72
+ Ed25519PrivateKey import import Ed25519PrivateKey L17–17
+ SigningIdentity import import SigningIdentity L24–24
+ annotations import import annotations L10–10
+ datetime import import datetime L12–12
+ hash_commit import import hash_commit L19–19
+ hash_snapshot import import hash_snapshot L19–19
+ heads_dir import import heads_dir L21–21
+ json import import json L13–13
+ logs_dir import import logs_dir L21–21
+ migrate_snapshot_content_and_cascade import import migrate_snapshot_content_and_cascade L23–23
+ muse_dir import import muse_dir L21–21
+ object_path import import object_path L20–20
+ objects_dir import import objects_dir L21–21
+ pathlib import import pathlib L14–14
+ provenance_payload import import provenance_payload L22–22
+ pytest import import pytest L16–16
+ ref_path import import ref_path L21–21
+ remotes_dir import import remotes_dir L21–21
+ sign_commit_ed25519 import import sign_commit_ed25519 L22–22
+ repo function function repo L30–33
+ test_rf_01_branch_head_updated_to_new_commit_id function function test_rf_01_branch_head_updated_to_new_commit_id L111–120
+ test_rf_02_untouched_branch_ref_unchanged function function test_rf_02_untouched_branch_ref_unchanged L128–136
+ test_rf_03_remote_tracking_ref_updated function function test_rf_03_remote_tracking_ref_updated L144–155
+ test_rf_04_reflog_entries_rewritten_selectively function function test_rf_04_reflog_entries_rewritten_selectively L164–184
+ test_rf_05_composed_result_matches_independent_phase_runs function function test_rf_05_composed_result_matches_independent_phase_runs L193–212

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