gabriel / muse public
refactor BREAKING dev
AI Agent gabriel · 162 days ago · Apr 17, 2026 · Diff

refactor: replace UUID4 with content-addressed IDs for stored entities

- audit_id (harmony): sha256(canonical entry JSON) — deterministic, idempotent - tag_id: sha256({repo_id, commit_id, tag}) via compute_tag_id() in store.py - release_id: sha256({repo_id, tag, commit_id}) via compute_release_id() in store.py - op_id (op_log): sha256(canonical op fields) — deterministic per actor+lamport+domain

Removes uuid imports from harmony.py, tag.py, release.py, op_log.py. Updates AuditEvent docstring, op_id length assertion in test_op_log.py. Fixes _short_id test imports in test_rebase_supercharge and test_release_supercharge to use short_id from muse.core._types instead of non-existent private helpers.

sha256:50470d19d6b9f939aedbf2baa6cab230a9c502396cf9ce32bb112ec574528f74 sha
+31 ~44 −4 symbols
sha256:c354a4f37fb81780dacc86f079fade98d825f88313a54afaa6738dade997694c snapshot
+31
symbols added
~44
symbols modified
−4
symbols removed
0
dead code introduced
Semantic Changes 79 symbols
~ muse/cli/commands/release.py .py 1 symbol added, 1 symbol removed, 11 symbols modified
~ muse/cli/commands/tag.py .py 1 symbol added, 1 symbol removed, 8 symbols modified
− uuid import import uuid L54–54
+ compute_tag_id import import compute_tag_id L59–59
~ muse/core/harmony.py .py 1 symbol added, 1 symbol removed, 3 symbols modified
− uuid import import uuid L92–92
+ long_id import import long_id L95–95
~ muse/core/op_log.py .py 1 symbol added, 1 symbol removed, 2 symbols modified
− _uuid_mod import import _uuid_mod L63–63
+ long_id import import long_id L65–65
~ muse/core/store.py .py 3 symbols added, 10 symbols modified
+ compute_release_id function function compute_release_id L1239–1252
+ compute_tag_id function function compute_tag_id L1148–1162
+ long_id import import long_id L152–152
~ tests/test_cmd_tag.py .py 8 symbols added
+ TestTagIdContentAddressed class class TestTagIdContentAddressed L121–180
+ test_cli_tag_add_returns_content_addressed_id method method test_cli_tag_add_returns_content_addressed_id L162–170
+ test_tag_id_differs_by_commit method method test_tag_id_differs_by_commit L146–151
+ test_tag_id_differs_by_tag_name method method test_tag_id_differs_by_tag_name L140–144
+ test_tag_id_is_deterministic method method test_tag_id_is_deterministic L132–138
+ test_tag_id_is_sha256_prefixed method method test_tag_id_is_sha256_prefixed L124–130
+ test_tag_id_not_uuid method method test_tag_id_not_uuid L153–160
+ test_write_tag_uses_content_addressed_id method method test_write_tag_uses_content_addressed_id L172–180
~ tests/test_harmony_comprehensive.py .py 3 symbols added, 1 symbol modified
+ test_audit_id_is_content_addressed method method test_audit_id_is_content_addressed L963–977
+ test_audit_id_is_deterministic method method test_audit_id_is_deterministic L979–998
+ test_audit_id_not_uuid method method test_audit_id_not_uuid L1000–1008
~ tests/test_op_log.py .py 6 symbols added, 2 symbols modified
+ TestOpIdContentAddressed class class TestOpIdContentAddressed L211–245
+ test_op_id_deterministic method method test_op_id_deterministic L228–233
+ test_op_id_differs_by_actor method method test_op_id_differs_by_actor L235–239
+ test_op_id_differs_by_lamport_ts method method test_op_id_differs_by_lamport_ts L241–245
+ test_op_id_is_sha256_prefixed method method test_op_id_is_sha256_prefixed L214–219
+ test_op_id_not_uuid method method test_op_id_not_uuid L221–226
~ tests/test_release_supercharge.py .py 7 symbols added, 7 symbols modified
+ TestReleaseIdContentAddressed class class TestReleaseIdContentAddressed L434–465
+ test_release_id_differs_by_commit method method test_release_id_differs_by_commit L463–465
+ test_release_id_differs_by_tag method method test_release_id_differs_by_tag L458–461
+ test_release_id_is_deterministic method method test_release_id_is_deterministic L452–456
+ test_release_id_is_sha256_prefixed method method test_release_id_is_sha256_prefixed L437–442
+ test_release_id_not_uuid method method test_release_id_not_uuid L444–450
+ _short_id import import _short_id L23–23
← Older Oldest on dev
All commits
Newer → Latest on dev

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