feat: implement muse code migrate — full layout and commit-ID migration
Rewrites all commits using the correct 7-field compute_commit_id formula (repo_id, parents, snapshot_id, message, committed_at, author, signer_public_key).
- Migrates flat objects/commits/snapshots to sha256/ canonical paths - Normalises bare hex refs to sha256: prefix; applies id_map to stale refs - Renames created_on_branch -> branch field; bumps format_version to 8 - Normalises bare base64 signatures to ed25519: prefix - Migrates UUID repo IDs to deterministic sha256: IDs via blob_id() - Updates reflogs with new commit IDs - MigrateResult tracks 14 counters; CLI --json exposes all fields - 92 tests, all passing - Fix _verify_commit_id in store.py: was calling compute_commit_id with wrong 4-field signature; restored correct 7-field call
sha256:b00766e16667508c8dc748f304d2e17f4bd9a3cbefbb1a039b829c4a1fca75f3
sha
+141
~28
−79
symbols
sha256:b5464b5da9ba00775e9d248ca5aa3f764bc17d3d79f06388459d1744ede6ec3a
snapshot
+141
symbols added
~28
symbols modified
−79
symbols removed
0
dead code introduced
Semantic Changes
248 symbols
~
run
~
migrate
−
test_dry_run_reports_old_to_new_mapping
method
method test_dry_run_reports_old_to_new_mapping L283–302
−
test_v1_raw_write_is_unreadable_by_read_commit
method
method test_v1_raw_write_is_unreadable_by_read_commit L230–236
−
test_json_commits_signed_zero_when_unsigned
method
method test_json_commits_signed_zero_when_unsigned L845–850
−
test_format_version_in_raw_dict_ignored
method
method test_format_version_in_raw_dict_ignored L760–774
−
test_old_branch_key_in_raw_dict_handled
method
method test_old_branch_key_in_raw_dict_handled L776–808
−
test_chain_all_readable_after_migrate
method
method test_chain_all_readable_after_migrate L386–399
−
test_merge_commit_both_parents_cascaded
method
method test_merge_commit_both_parents_cascaded L434–498
−
test_blob_already_at_canonical_not_duplicated
method
method test_blob_already_at_canonical_not_duplicated L720–736
−
test_legacy_blob_moved_to_canonical_path
method
method test_legacy_blob_moved_to_canonical_path L685–701
−
test_signed_migrate_all_commits_signed
method
method test_signed_migrate_all_commits_signed L897–912
−
test_signed_migrate_produces_valid_signatures
method
method test_signed_migrate_produces_valid_signatures L864–895
−
test_signed_migrate_signer_public_key_bound_in_commit_id
method
method test_signed_migrate_signer_public_key_bound_in_commit_id L914–944
+
test_branch_value_preserved_after_rename
method
method test_branch_value_preserved_after_rename L736–743
+
test_created_on_branch_key_renamed_to_branch
method
method test_created_on_branch_key_renamed_to_branch L726–734
+
test_dry_run_does_not_rename_branch_field
method
method test_dry_run_does_not_rename_branch_field L774–782
+
test_result_branch_fields_renamed_count
method
method test_result_branch_fields_renamed_count L760–772
+
test_dry_run_does_not_rewrite_commits
method
method test_dry_run_does_not_rewrite_commits L1007–1017
+
test_id_map_contains_old_to_new_mapping
method
method test_id_map_contains_old_to_new_mapping L883–890
+
test_linear_chain_all_old_files_deleted
method
method test_linear_chain_all_old_files_deleted L920–936
+
test_merge_commit_both_parents_cascaded
method
method test_merge_commit_both_parents_cascaded L938–960
+
test_multiple_branch_heads_all_updated
method
method test_multiple_branch_heads_all_updated L988–1005
+
test_new_commit_id_matches_current_formula
method
method test_new_commit_id_matches_current_formula L871–881
+
test_old_commit_file_deleted_after_rewrite
method
method test_old_commit_file_deleted_after_rewrite L860–869
+
test_single_commit_wrong_id_rewritten
method
method test_single_commit_wrong_id_rewritten L850–858
+
test_dry_run_does_not_relocate_flat_commit
method
method test_dry_run_does_not_relocate_flat_commit L402–412
+
test_flat_commit_relocated_to_sha256_subdir
method
method test_flat_commit_relocated_to_sha256_subdir L348–361
+
test_flat_commit_removed_after_relocation
method
method test_flat_commit_removed_after_relocation L363–374
+
test_flat_commit_with_correct_id_not_rewritten
method
method test_flat_commit_with_correct_id_not_rewritten L376–388
+
test_result_commits_relocated_counted
method
method test_result_commits_relocated_counted L390–400
+
test_dry_run_does_not_update_repo_json
method
method test_dry_run_does_not_update_repo_json L1211–1218
+
test_dry_run_makes_zero_writes_to_commits
method
method test_dry_run_makes_zero_writes_to_commits L1198–1209
+
test_dry_run_makes_zero_writes_to_objects
method
method test_dry_run_makes_zero_writes_to_objects L1187–1196
+
test_dry_run_reports_correct_blobs_to_migrate
method
method test_dry_run_reports_correct_blobs_to_migrate L1233–1240
+
test_current_format_version_unchanged
method
method test_current_format_version_unchanged L805–818
+
test_result_format_versions_bumped_count
method
method test_result_format_versions_bumped_count L820–832
+
test_second_run_reports_zero_blobs_migrated
method
method test_second_run_reports_zero_blobs_migrated L1261–1268
+
test_second_run_reports_zero_commits_rewritten
method
method test_second_run_reports_zero_commits_rewritten L1248–1259
+
test_second_run_reports_zero_refs_updated
method
method test_second_run_reports_zero_refs_updated L1279–1290
+
test_second_run_reports_zero_snapshots_relocated
method
method test_second_run_reports_zero_snapshots_relocated L1270–1277
+
test_json_dry_run_flag_true_with_flag
method
method test_json_dry_run_flag_true_with_flag L1430–1433
+
test_json_id_map_is_dict_of_prefixed_ids
method
method test_json_id_map_is_dict_of_prefixed_ids L1452–1464
+
test_json_merge_in_progress_exits_nonzero
method
method test_json_merge_in_progress_exits_nonzero L1466–1476
+
test_mix_of_flat_and_canonical_objects
method
method test_mix_of_flat_and_canonical_objects L1325–1334
+
test_mix_of_flat_and_canonical_snapshots
method
method test_mix_of_flat_and_canonical_snapshots L1369–1376
+
test_mix_of_legacy_and_canonical_commit_ids
method
method test_mix_of_legacy_and_canonical_commit_ids L1336–1351
+
test_dry_run_does_not_move_flat_objects
method
method test_dry_run_does_not_move_flat_objects L321–331
+
test_flat_object_moved_to_sha256_subdir
method
method test_flat_object_moved_to_sha256_subdir L248–258
+
test_flat_object_not_present_after_move
method
method test_flat_object_not_present_after_move L282–290
+
test_result_legacy_dirs_removed_count
method
method test_result_legacy_dirs_removed_count L313–319
+
test_clean_repo_proceeds_without_error
method
method test_clean_repo_proceeds_without_error L1398–1401
+
test_dry_run_does_not_update_bare_ref
method
method test_dry_run_does_not_update_bare_ref L545–551
+
test_reflog_ids_updated_when_in_id_map
method
method test_reflog_ids_updated_when_in_id_map L1116–1130
+
test_reflog_with_no_stale_ids_unchanged
method
method test_reflog_with_no_stale_ids_unchanged L1132–1143
+
test_already_prefixed_remote_ref_unchanged
method
method test_already_prefixed_remote_ref_unchanged L573–584
+
test_dry_run_does_not_update_remote_ref
method
method test_dry_run_does_not_update_remote_ref L631–643
+
test_result_remote_refs_updated_count
method
method test_result_remote_refs_updated_count L617–629
+
test_stale_remote_ref_updated_after_id_recompute
method
method test_stale_remote_ref_updated_after_id_recompute L603–615
+
test_migrated_repo_id_is_deterministic
method
method test_migrated_repo_id_is_deterministic L667–673
+
test_result_repo_id_updated_flag_false_for_valid
method
method test_result_repo_id_updated_flag_false_for_valid L690–695
+
test_result_repo_id_updated_flag_true_for_uuid
method
method test_result_repo_id_updated_flag_true_for_uuid L683–688
+
test_uuid_repo_id_replaced_with_sha256_id
method
method test_uuid_repo_id_replaced_with_sha256_id L659–665
+
test_bare_base64_sig_gets_ed25519_prefix
method
method test_bare_base64_sig_gets_ed25519_prefix L1041–1053
+
test_result_signatures_normalised_count
method
method test_result_signatures_normalised_count L1082–1094
+
test_canonical_snapshot_not_duplicated
method
method test_canonical_snapshot_not_duplicated L453–461
+
test_dry_run_does_not_move_flat_snapshot
method
method test_dry_run_does_not_move_flat_snapshot L472–480
+
test_flat_snapshot_moved_to_sha256_subdir
method
method test_flat_snapshot_moved_to_sha256_subdir L420–430
+
test_flat_snapshot_removed_after_move
method
method test_flat_snapshot_removed_after_move L432–440
+
test_multiple_flat_snapshots_all_moved
method
method test_multiple_flat_snapshots_all_moved L442–451
+
test_result_snapshots_relocated_counted
method
method test_result_snapshots_relocated_counted L463–470
~
_set_ref
~
_snap
~
blob_id
Older
Merge branch 'dev' into main
sha256:760d8119e3f574942c4308fd758056b931711a007d3c46d7ac146a7fa7db2a7f
All commits
Newer
test: fix test suite for sha256: prefix, stderr/stdout split, an…
sha256:e35d3b4bd7990e3b09d4ae6312c4f16e89e2756ba6a56e0fd9b4788cda8c60a8
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:b00766e16667508c8dc748f304d2e17f4bd9a3cbefbb1a039b829c4a1fca75f3 --body "your comment"
No comments yet. Be the first to start the discussion.