gabriel / muse public
feat patch migrate task/phase2-legacy-store-migration #1 / 1
AI Agent gabriel · 118 days ago · May 21, 2026 · Diff

feat(migrate): Phase 2 — migrate legacy dirs to unified object store

- migrate() deletes .muse/commits/ and .muse/snapshots/ after writing all content to the unified object store (guarded by dry_run flag) - init_repo_dirs() no longer creates commits_dir or snapshots_dir - Added 12 TDD tests in test_phase2_legacy_store_migration.py - Updated test_code_migrate.py helpers to read from object store instead of the now-deleted legacy directories

sha256:2c1ca28035d516023ea39067cd17c86e38631cd982a6ec9aee235870e015d373 sha
+45 ~11 symbols
sha256:18f5d97c8190e8cb3631d610c12fb6ffd2dd6b08d0d9914e369a61ba48367e82 snapshot
+45
symbols added
~11
symbols modified
0
dead code introduced
Semantic Changes 56 symbols
+ BLOB_A variable variable BLOB_A L33–33
+ TestInitDoesNotCreateLegacyDirs class class TestInitDoesNotCreateLegacyDirs L336–349
+ test_init_does_not_create_commits_dir method method test_init_does_not_create_commits_dir L337–342
+ test_init_does_not_create_snapshots_dir method method test_init_does_not_create_snapshots_dir L344–349
+ TestLegacyCommitsMigrate class class TestLegacyCommitsMigrate L183–238
+ test_legacy_commit_fields_preserved_after_migrate method method test_legacy_commit_fields_preserved_after_migrate L199–218
+ test_legacy_commit_readable_after_migrate method method test_legacy_commit_readable_after_migrate L184–197
+ test_two_legacy_commits_both_readable_after_migrate method method test_two_legacy_commits_both_readable_after_migrate L220–238
+ TestLegacyDirCleanedAfterMigrate class class TestLegacyDirCleanedAfterMigrate L270–329
+ test_commits_dir_removed_after_migrate method method test_commits_dir_removed_after_migrate L271–282
+ test_dry_run_does_not_remove_commits_dir method method test_dry_run_does_not_remove_commits_dir L307–317
+ test_dry_run_does_not_remove_snapshots_dir method method test_dry_run_does_not_remove_snapshots_dir L319–329
+ test_empty_commits_dir_removed_after_migrate method method test_empty_commits_dir_removed_after_migrate L297–305
+ test_snapshots_dir_removed_after_migrate method method test_snapshots_dir_removed_after_migrate L284–295
+ TestLegacySnapshotsMigrate class class TestLegacySnapshotsMigrate L245–263
+ test_legacy_snapshot_in_object_store_after_migrate method method test_legacy_snapshot_in_object_store_after_migrate L246–263
+ TestReadCommitDoesNotTouchLegacyDir class class TestReadCommitDoesNotTouchLegacyDir L169–176
+ test_returns_none_for_id_only_in_commits_dir method method test_returns_none_for_id_only_in_commits_dir L170–176
+ _old_blob_id function function _old_blob_id L36–37
+ _old_commit_id function function _old_commit_id L80–99
+ _old_snapshot_id function function _old_snapshot_id L48–53
+ _write_legacy_commit_msgpack function function _write_legacy_commit_msgpack L102–152
+ _write_legacy_snapshot_msgpack function function _write_legacy_snapshot_msgpack L56–77
+ _write_old_blob function function _write_old_blob L40–45
+ annotations import import annotations L13–13
+ commits_dir import import commits_dir L24–24
+ hash_blob import import hash_blob L22–22
+ hash_commit import import hash_commit L22–22
+ hash_snapshot import import hash_snapshot L22–22
+ hashlib import import hashlib L15–15
+ init_repo_dirs import import init_repo_dirs L24–24
+ json import import json L16–16
+ long_id import import long_id L26–26
+ msgpack import import msgpack L19–19
+ object_path import import object_path L23–23
+ objects_dir import import objects_dir L23–23
+ pathlib import import pathlib L17–17
+ pytest import import pytest L20–20
+ read_commit import import read_commit L25–25
+ read_muse_object import import read_muse_object L23–23
+ snapshots_dir import import snapshots_dir L24–24
+ repo function function repo L160–162
~ muse/core/migrate.py .py 1 symbol added, 1 symbol modified
+ shutil import import shutil L30–30
~ muse/core/paths.py .py 1 symbol modified
← Older Oldest on task/phase2-legacy-store-migration
All commits
Newer → Latest on task/phase2-legacy-store-migration

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