gabriel / muse public
refactor tests task/hashlib-cleanup #1 / 1
AI Agent gabriel · 133 days ago · May 5, 2026 · Diff

refactor(tests): eliminate remaining hashlib wrappers; fix genesis docstrings

- Replace long_id(hashlib.sha256(data).hexdigest()) with f'sha256:{hashlib.sha256(data).hexdigest()}' in test_core_types.py (blob_id and hash_file test assertions — keeps actual verification) - Replace long_id(hashlib.sha256(data).hexdigest()) with blob_id(data) in test_public_key_fingerprint.py; remove unused long_id and hashlib imports - Inline blob_id + split_id in shelf-path helpers across test_cmd_gc_hardening, test_gc_full, test_object_store_write_taxonomy, test_core_gc, test_gc_path_helpers_and_remote_refs; remove import hashlib from each - test_hash_object_canonical: bare_hex = split_id(blob_id(content))[1]; remove hashlib - test_security_object_store_poisoning: remove _sha256 wrapper; inline blob_id at ~10 sites; replace streaming sha256 block with hash_file(); remove hashlib - test_code_migrate: _object_flat/_object_canonical use blob_id+split_id; remove hashlib

sha256:3fb803bba4132194e20e5bd58d61330d939d141b441f657239c021e9f2181ce0 sha
+6 ~73 −10 symbols
sha256:e6f9dc0d23d6e6b1ee369ddfeab21c78e4ebd2a52e9edc2c268ec7d12bbeb1a2 snapshot
+6
symbols added
~73
symbols modified
−10
symbols removed
0
dead code introduced
Semantic Changes 89 symbols
~ tests/test_cmd_gc_hardening.py .py 1 symbol removed, 1 symbol modified
hashlib import import hashlib L54–54
~ tests/test_code_migrate.py .py 1 symbol added, 1 symbol removed, 6 symbols modified
hashlib import import hashlib L33–33
+ split_id import import split_id L42–42
~ tests/test_core_gc.py .py 1 symbol added, 1 symbol removed, 3 symbols modified
hashlib import import hashlib L5–5
+ split_id import import split_id L15–15
~ tests/test_gc_full.py .py 1 symbol removed, 1 symbol modified
hashlib import import hashlib L65–65
~ tests/test_gc_path_helpers_and_remote_refs.py .py 1 symbol added, 5 symbols modified
+ split_id import import split_id L43–43
~ tests/test_hash_object_canonical.py .py 1 symbol added, 1 symbol removed, 3 symbols modified
hashlib import import hashlib L19–19
+ split_id import import split_id L25–25
~ tests/test_object_store_write_taxonomy.py .py 1 symbol removed, 3 symbols modified
~ tests/test_public_key_fingerprint.py .py 1 symbol added, 2 symbols removed, 4 symbols modified
hashlib import import hashlib L9–9
long_id import import long_id L14–14
+ blob_id import import blob_id L12–12
~ tests/test_security_object_store_poisoning.py .py 1 symbol added, 2 symbols removed, 42 symbols modified
_sha256 function function _sha256 L50–51
hashlib import import hashlib L21–21
+ hash_file import import hash_file L41–41
← Older Oldest on task/hashlib-cleanup
All commits
Newer → Latest on task/hashlib-cleanup

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