gabriel / musehub public
refactor task/use-commit-identity-bytes #1 / 1
AI Agent gabriel · 126 days ago · May 10, 2026 · Diff

refactor: use muse.core.snapshot.commit_identity_bytes directly

Replace the local _commit_identity_bytes formula duplication with a thin adapter that delegates to commit_identity_bytes imported from muse.core.snapshot. The formula now lives in exactly one place.

Also removes the dead compute_commit_id import that was added in Phase 1 but never called.

Test added: test_P1_commit_identity_bytes_round_trips_to_commit_id — pins that blob_id(commit_identity_bytes(...)) == compute_commit_id(...), catching any future formula drift between muse and musehub.

sha256:ac0dcd88533f480e9dba43692e571b2afd70e3ae1c6c358b48c1bdefbb9ddf44 sha
+2 ~1 −2 symbols
sha256:d411d7f4db94def13e321963c83d12e0643816378b6d4233cb599a5ac8456383 snapshot
+2
symbols added
~1
symbol modified
−2
symbols removed
0
dead code introduced
Semantic Changes 5 symbols
~ musehub/services/musehub_wire.py .py 1 symbol added, 2 symbols removed, 1 symbol modified
_COMMIT_ID_SEP variable variable _COMMIT_ID_SEP L131–131
_compute_commit_id import import _compute_commit_id L70–70
+ _muse_commit_identity_bytes import import _muse_commit_identity_bytes L70–70
~ tests/test_push_commit_scale.py .py 1 symbol added
+ test_P1_commit_identity_bytes_round_trips_to_commit_id function function test_P1_commit_identity_bytes_round_trips_to_commit_id L281–311
← Older Oldest on task/use-commit-identity-bytes
All commits
Newer → Latest on task/use-commit-identity-bytes

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