gabriel / muse public
feat BREAKING task/sig-algo-prefix #1 / 1
AI Agent gabriel · 160 days ago · Apr 18, 2026 · Diff

feat: replace signature_format int with algo-prefixed ed25519: values

- Add encode_sig, encode_pubkey, decode_sig, decode_pubkey, sig_algo to _types.py - Remove signature_format field from CommitRecord, CommitDict, store serialization - Rewrite sign_commit_ed25519, verify_commit_ed25519, encode_public_key to use helpers - Update verify.py, verify_commit.py, verify_tag.py to dispatch on sig_algo prefix - Fix all tests to use helpers instead of raw base64 codec operations - Fix test helpers: strip sha256: prefix for filenames, store prefixed IDs in records

sha256:c919294aa51339dd3c8c5d02b0b5695d6b2597321131053d20b1e431773d5435 sha
+68 ~57 −15 symbols
sha256:6ca46260a438d7c05765b8dc8fbaf749211350cb9ef030282561bb6fd843ed5d snapshot
+68
symbols added
~57
symbols modified
−15
symbols removed
0
dead code introduced
Semantic Changes 140 symbols
~ muse/cli/commands/commit.py .py 1 symbol removed, 4 symbols modified
− PROVENANCE_PAYLOAD_VERSION import import PROVENANCE_PAYLOAD_VERSION L46–46
~ run
~ muse/cli/commands/verify_commit.py .py 2 symbols added, 2 symbols removed, 4 symbols modified
− PROVENANCE_PAYLOAD_VERSION import import PROVENANCE_PAYLOAD_VERSION L66–66
− base64 import import base64 L56–56
+ decode_pubkey import import decode_pubkey L63–63
+ sig_algo import import sig_algo L63–63
~ muse/cli/commands/verify_tag.py .py 2 symbols added, 1 symbol removed, 1 symbol modified
− base64 import import base64 L57–57
+ decode_pubkey import import decode_pubkey L65–65
+ sig_algo import import sig_algo L65–65
~ muse/core/_types.py .py 6 symbols added
+ decode_pubkey function function decode_pubkey L320–346
+ decode_sig function function decode_sig L289–317
+ encode_pubkey function function encode_pubkey L268–286
+ encode_sig function function encode_sig L250–265
+ base64 import import base64 L9–9 ← moved from tests/test_provenance.py
+ sig_algo function function sig_algo L349–370
~ muse/core/provenance.py .py 5 symbols added, 1 symbol removed, 4 symbols modified
− base64 import import base64 L60–60
+ decode_pubkey import import decode_pubkey L66–66
+ decode_sig import import decode_sig L66–66
+ encode_pubkey import import encode_pubkey L66–66
+ encode_sig import import encode_sig L66–66
+ sig_algo import import sig_algo L66–66
~ muse/core/verify.py .py 2 symbols added, 3 symbols modified
+ decode_pubkey import import decode_pubkey L57–57
+ sig_algo import import sig_algo L57–57
~ tests/test_cmd_verify_commit.py .py 4 symbols added, 4 symbols removed, 10 symbols modified
− PROVENANCE_PAYLOAD_VERSION import import PROVENANCE_PAYLOAD_VERSION L26–26
− base64 import import base64 L16–16
− test_signature_format_round_trips_through_store function function test_signature_format_round_trips_through_store L498–506
− test_verify_one_unknown_signature_format_returns_invalid function function test_verify_one_unknown_signature_format_returns_invalid L509–528
+ decode_sig import import decode_sig L32–32
+ encode_sig import import encode_sig L32–32
+ test_ed25519_prefix_survives_store_roundtrip function function test_ed25519_prefix_survives_store_roundtrip L490–503
+ test_verify_one_unknown_algo_prefix_returns_invalid function function test_verify_one_unknown_algo_prefix_returns_invalid L506–528
~ tests/test_cmd_verify_tag.py .py 4 symbols added, 2 symbols removed, 5 symbols modified
− _sha function function _sha L52–53
− hashlib import import hashlib L19–19
+ blob_id import import blob_id L38–38
+ decode_sig import import decode_sig L38–38
+ encode_sig import import encode_sig L38–38
+ sig_algo import import sig_algo L38–38
~ tests/test_core_provenance.py .py 13 symbols added, 1 symbol removed, 3 symbols modified
− base64 import import base64 L11–11
+ TestAlgorithmPrefix class class TestAlgorithmPrefix L173–256
+ test_commit_record_has_no_signature_format_field method method test_commit_record_has_no_signature_format_field L241–256
+ test_encode_public_key_returns_ed25519_prefix method method test_encode_public_key_returns_ed25519_prefix L223–231
+ test_sign_commit_record_pubkey_prefixed method method test_sign_commit_record_pubkey_prefixed L233–239
+ test_sign_returns_ed25519_prefix method method test_sign_returns_ed25519_prefix L181–186
+ test_sign_suffix_is_valid_base64url method method test_sign_suffix_is_valid_base64url L188–194
+ test_verify_accepts_prefixed_signature method method test_verify_accepts_prefixed_signature L196–202
+ test_verify_rejects_bare_base64url method method test_verify_rejects_bare_base64url L204–212
+ test_verify_rejects_unknown_prefix method method test_verify_rejects_unknown_prefix L214–221
+ decode_pubkey import import decode_pubkey L15–15
+ decode_sig import import decode_sig L15–15
+ encode_sig import import encode_sig L15–15
+ sig_algo import import sig_algo L15–15
~ tests/test_core_types.py .py 23 symbols added
+ TestDecodePubkey class class TestDecodePubkey L421–433
+ test_distinct_from_decode_sig method method test_distinct_from_decode_sig L431–433
+ test_parses_algo_and_bytes method method test_parses_algo_and_bytes L424–429
+ TestDecodeSig class class TestDecodeSig L390–418
+ test_parses_algo_and_bytes method method test_parses_algo_and_bytes L393–398
+ test_raises_on_bad_base64 method method test_raises_on_bad_base64 L406–410
+ test_raises_on_missing_prefix method method test_raises_on_missing_prefix L400–404
+ test_unknown_algo_is_returned_not_raised method method test_unknown_algo_is_returned_not_raised L412–418
+ TestEncodePubkey class class TestEncodePubkey L359–387
+ test_distinct_from_encode_sig method method test_distinct_from_encode_sig L384–387
+ test_ed25519_prefix method method test_ed25519_prefix L365–369
+ test_no_padding_chars method method test_no_padding_chars L371–374
+ test_round_trips_through_decode_pubkey method method test_round_trips_through_decode_pubkey L376–382
+ TestEncodeSig class class TestEncodeSig L330–356
+ test_custom_algo method method test_custom_algo L352–356
+ test_ed25519_prefix method method test_ed25519_prefix L333–337
+ test_no_padding_chars method method test_no_padding_chars L339–342
+ test_round_trips_through_decode_sig method method test_round_trips_through_decode_sig L344–350
+ TestSigAlgo class class TestSigAlgo L436–453
+ test_custom_algo method method test_custom_algo L451–453
+ test_returns_algo_for_prefixed method method test_returns_algo_for_prefixed L439–441
+ test_returns_empty_for_empty_string method method test_returns_empty_for_empty_string L447–449
+ test_returns_empty_for_unprefixed method method test_returns_empty_for_unprefixed L443–445
~ tests/test_provenance.py .py 5 symbols added, 3 symbols removed, 5 symbols modified
− test_signature_is_base64url_string method method test_signature_is_base64url_string L110–115
− test_encode_public_key_returns_32_bytes_and_b64 method method test_encode_public_key_returns_32_bytes_and_b64 L160–168
− base64 import import base64 L3–3 → moved to muse/core/_types.py
+ test_signature_is_prefixed_base64url_string method method test_signature_is_prefixed_base64url_string L111–117
+ test_encode_public_key_returns_32_bytes_and_prefixed_b64 method method test_encode_public_key_returns_32_bytes_and_prefixed_b64 L162–172
+ decode_pubkey import import decode_pubkey L9–9
+ decode_sig import import decode_sig L9–9
+ encode_sig import import encode_sig L9–9
← Older Oldest on task/sig-algo-prefix
All commits
Newer → Latest on task/sig-algo-prefix

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