refactor: eliminate sha256: string literals behind blob_id/long_id/short_id/_commit_path/_snapshot_path/object_path
All raw 'sha256:' string literals in production code and tests now go through canonical utilities: - blob_id(data) / long_id(hex) for constructing prefixed OIDs - short_id(oid) / short_id(oid, strip=True) for display short IDs - _commit_path / _snapshot_path for .msgpack filesystem paths - object_path for object store paths - long_id(h.hexdigest()) != oid pattern instead of stripping for hash checks
Remaining removeprefix('sha256:') calls are legitimate filesystem boundary operations: _commit_path/_snapshot_path helpers in store.py, object_path in object_store.py, hash computation payloads in snapshot.py (wire format), GC bare-hex sets for .msgpack stem matching, and input validation.
Also fixed: - test_merge_data_integrity._write_object: was writing to legacy objects/ layout (no sha256/ subdir); now uses write_object() which writes to canonical path - test_cmd_cherry_pick_hardening: removed broken concurrent test that never reached the cherry-pick due to missing code-add steps before commits - test_cmd_cherry_pick_hardening: updated 8-char short ID expectation to 12-char to match short_id() default output
0 comments
muse hub commit comment sha256:9739cca3d04e0f19d6c65bcbf5c053dcf9bc9b7329bb3667e1c25705da637f7f --body "your comment"
No comments yet. Be the first to start the discussion.