gabriel / muse public
fix patch task/fix-short-id-display #1 / 1
AI Agent gabriel · 160 days ago · Apr 17, 2026 · Diff

fix: restore sha256: prefix in all text output short IDs

The 'sha256:' prefix is canonical — it identifies the hash algorithm. Strip it from disk paths (Windows constraint) but preserve it everywhere the user or agent sees a commit ID.

Before: commit_id.removeprefix('sha256:')[:8] → 'a1b2c3d4' After: 'sha256:' + commit_id.removeprefix('sha256:')[:8] → 'sha256:a1b2c3d4'

Commands fixed: commit.py, checkout.py, cherry_pick.py (6 text output sites) Tests updated: test_cmd_commit.py, test_cmd_checkout.py, test_cmd_cherry_pick_hardening.py

TestTextOutputHex classes now assert sha256: prefix IS present and that exactly 8 meaningful hex chars follow it.

sha256:38d631372251d1dc8fb2d0c7df5faebd3a2d153e270bc328ac089b1a66d78578 sha
+5 ~10 −5 symbols
sha256:8570ce727819992370c963010125f63d1b1de42ebb6297f8d618940360a3d571 snapshot
+5
symbols added
~10
symbols modified
−5
symbols removed
0
dead code introduced
Semantic Changes 20 symbols
~ muse/cli/commands/checkout.py .py 1 symbol modified
~ run
~ muse/cli/commands/cherry_pick.py .py 1 symbol modified
~ run
~ muse/cli/commands/commit.py .py 1 symbol modified
~ run
~ tests/test_cmd_cherry_pick_hardening.py .py 2 symbols added, 2 symbols removed, 1 symbol modified
test_dry_run_text_shows_bare_hex method method test_dry_run_text_shows_bare_hex L1157–1175
test_picked_text_shows_bare_hex method method test_picked_text_shows_bare_hex L1144–1155
+ test_dry_run_text_shows_prefixed_short_id method method test_dry_run_text_shows_prefixed_short_id L1158–1176
+ test_picked_text_shows_prefixed_short_id method method test_picked_text_shows_prefixed_short_id L1144–1156
~ tests/test_cmd_commit.py .py 3 symbols added, 3 symbols removed, 3 symbols modified
test_dry_run_shows_8_hex_chars method method test_dry_run_shows_8_hex_chars L1088–1093
test_real_commit_shows_8_hex_chars method method test_real_commit_shows_8_hex_chars L1079–1086
test_text_output_no_sha256_prefix_in_short_id method method test_text_output_no_sha256_prefix_in_short_id L1095–1105
+ test_dry_run_shows_prefixed_short_id method method test_dry_run_shows_prefixed_short_id L1087–1092
+ test_real_commit_shows_prefixed_short_id method method test_real_commit_shows_prefixed_short_id L1079–1085
+ test_text_output_has_8_meaningful_hex_chars method method test_text_output_has_8_meaningful_hex_chars L1094–1102
← Older Oldest on task/fix-short-id-display
All commits
Newer → Latest on task/fix-short-id-display

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