refactor
BREAKING
store
task/store-phase3-commits
#1 / 1
refactor(store): Phase 3 — extract commit layer to muse.core.commits
Move CommitRecord, CommitDict, MissingParentError, WalkResult, and all commit I/O functions (write_commit, read_commit, resolve_commit_ref, etc.) from store.py into muse/core/commits.py.
Extract shared deserializer helpers (_str_val, _int_val, _str_or_none, _str_list, _str_dict, _float_val) into muse/core/record_helpers.py to avoid circular imports with SnapshotRecord/TagRecord/ReleaseRecord that remain in store.py.
store.py re-exports all extracted symbols for backward-compatible imports. No callers need updating — existing from muse.core.store import X still works.
sha256:63508f7da4df6cf72f8518fe9c825edf74add2a4b6901fb2e2fe24691e629cf8
sha
+113
−41
symbols
sha256:515772ea63ec7cdd57c22f6b69c82a30d8d80cc2b95e4a947a90c1ab51f56218
snapshot
+113
symbols added
−41
symbols removed
0
dead code introduced
Semantic Changes
154 symbols
+
_as_structured_delta
function
function _as_structured_delta L83–92 ← moved from muse/core/store.py
+
_known_commits_dirs
variable
variable _known_commits_dirs L365–365 ← moved from muse/core/store.py
+
commit_read_is_corrupt
function
function commit_read_is_corrupt L521–525 ← moved from muse/core/store.py
+
commit_read_is_not_found
function
function commit_read_is_not_found L514–518 ← moved from muse/core/store.py
+
find_commits_by_prefix
function
function find_commits_by_prefix L699–719 ← moved from muse/core/store.py
+
get_head_snapshot_id
function
function get_head_snapshot_id L603–614 ← moved from muse/core/store.py
+
update_commit_metadata
function
function update_commit_metadata L580–597 ← moved from muse/core/store.py
−
_as_structured_delta
function
function _as_structured_delta L256–265 → moved to muse/core/commits.py
−
_known_commits_dirs
variable
variable _known_commits_dirs L918–918 → moved to muse/core/commits.py
−
commit_read_is_corrupt
function
function commit_read_is_corrupt L1134–1138 → moved to muse/core/commits.py
−
commit_read_is_not_found
function
function commit_read_is_not_found L1128–1132 → moved to muse/core/commits.py
−
find_commits_by_prefix
function
function find_commits_by_prefix L1318–1338 → moved to muse/core/commits.py
−
get_head_snapshot_id
function
function get_head_snapshot_id L1215–1226 → moved to muse/core/commits.py
−
update_commit_metadata
function
function update_commit_metadata L1196–1213 → moved to muse/core/commits.py
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:63508f7da4df6cf72f8518fe9c825edf74add2a4b6901fb2e2fe24691e629cf8 --body "your comment"
No comments yet. Be the first to start the discussion.