gabriel / muse public
refactor BREAKING store task/store-phase5-tags #1 / 1
AI Agent gabriel · 118 days ago · May 21, 2026 · Diff

refactor(store): extract tag layer into muse.core.tags

Move TagDict, TagRecord, compute_tag_id, tag_path, write_tag, _read_tag_or_migrate, get_tags_for_commit, delete_tag, get_all_tags, and get_tag_by_name out of muse/core/store.py into a new muse/core/tags.py module.

All symbols remain importable from muse.core.store via re-exports so no callers need updating. Removed the now-unused _tags_dir import from the store.py paths block.

sha256:83a84fcb54cbfd1f9782171cb3c71db47539b5209c75f5b24054b9a15b70aa63 sha
+40 ~7 −13 symbols
sha256:62dc8c61943ca80df012361d50b17fc42220d172ac775339a665f939bb660347 snapshot
+40
symbols added
~7
symbols modified
−13
symbols removed
0
dead code introduced
Semantic Changes 60 symbols
~ muse/core/tags.py .py 30 symbols added
+ TagDict class class TagDict L46–57 ← moved from muse/core/store.py
+ TagRecord class class TagRecord L79–127 ← moved from muse/core/store.py
+ from_dict method method from_dict L108–127 ← moved from muse/core/store.py
+ to_dict method method to_dict L94–105 ← moved from muse/core/store.py
+ _read_tag_or_migrate function function _read_tag_or_migrate L170–186 ← moved from muse/core/store.py
+ compute_tag_id function function compute_tag_id L64–71 ← moved from muse/core/store.py
+ delete_tag function function delete_tag L207–214 ← moved from muse/core/store.py
+ get_all_tags function function get_all_tags L217–236 ← moved from muse/core/store.py
+ get_tag_by_name function function get_tag_by_name L239–246 ← moved from muse/core/store.py
+ get_tags_for_commit function function get_tags_for_commit L189–204 ← moved from muse/core/store.py
+ Manifest import import Manifest L37–37
+ MsgpackDict import import MsgpackDict L37–37
+ TypedDict import import TypedDict L32–32
+ _json import import _json L28–28
+ _read_msgpack_dict import import _read_msgpack_dict L34–34
+ _str_val import import _str_val L36–36
+ _tags_dir import import _tags_dir L35–35
+ _write_json_atomic import import _write_json_atomic L34–34
+ annotations import import annotations L25–25
+ content_hash import import content_hash L37–37
+ dataclass class import dataclass L31–31
+ datetime import import datetime L27–27
+ field import import field L31–31
+ logging import import logging L29–29
+ pathlib import import pathlib L30–30
+ short_id import import short_id L37–37
+ split_id import import split_id L37–37
+ logger variable variable logger L39–39
+ tag_path function function tag_path L134–155 ← moved from muse/core/store.py
+ write_tag function function write_tag L162–167 ← moved from muse/core/store.py
~ muse/core/store.py .py 10 symbols added, 13 symbols removed, 7 symbols modified
TagDict class class TagDict L329–340 → moved to muse/core/tags.py
TagRecord class class TagRecord L356–404 → moved to muse/core/tags.py
from_dict method method from_dict L385–404 → moved to muse/core/tags.py
to_dict method method to_dict L371–382 → moved to muse/core/tags.py
_read_tag_or_migrate function function _read_tag_or_migrate L730–746 → moved to muse/core/tags.py
compute_tag_id function function compute_tag_id L346–353 → moved to muse/core/tags.py
delete_tag function function delete_tag L783–790 → moved to muse/core/tags.py
get_all_tags function function get_all_tags L792–811 → moved to muse/core/tags.py
get_tag_by_name function function get_tag_by_name L813–820 → moved to muse/core/tags.py
get_tags_for_commit function function get_tags_for_commit L766–781 → moved to muse/core/tags.py
_tags_dir import import _tags_dir L157–157
tag_path function function tag_path L527–548 → moved to muse/core/tags.py
write_tag function function write_tag L723–728 → moved to muse/core/tags.py
+ TagDict import import TagDict L237–237
+ TagRecord import import TagRecord L237–237
+ _read_tag_or_migrate import import _read_tag_or_migrate L237–237
+ compute_tag_id import import compute_tag_id L237–237
+ delete_tag import import delete_tag L237–237
+ get_all_tags import import get_all_tags L237–237
+ get_tag_by_name import import get_tag_by_name L237–237
+ get_tags_for_commit import import get_tags_for_commit L237–237
+ tag_path import import tag_path L237–237
+ write_tag import import write_tag L237–237
← Older Oldest on task/store-phase5-tags
All commits
Newer → Latest on task/store-phase5-tags

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