fix(wire): detect and auto-delete corrupted objects at serve time
When _pack_objects_response fetches an object from R2 and its sha256 does not match the declared object_id, the server now: 1. Logs the integrity failure with both expected and actual hashes 2. Deletes the corrupted object from R2 immediately via backend.delete() 3. Omits the object from the response (client treats it as missing)
This means clients never receive content that fails hash verification, and the corruption is cleaned up at the source so future fetches don't re-serve it. Previously, the corrupted bytes were served as-is, causing muse clone to crash with ValueError on write_object's integrity check.
TDD: test_corrupted_object_omitted_and_deleted_from_r2 covers both the omission from the response and the R2 deletion.
sha256:2b871904081d3fb80dc8ddb7a816da7cf9463cd88df94f1523848981c72521e1
sha
sha256:cb4f9c5e347476c52ed15352dda4b6dd6bfcc0c188fb16b9c03f6583d7543f60
snapshot
← Older
Oldest on task/auto-delete-corrupt-objects
All commits
Newer →
Latest on task/auto-delete-corrupt-objects
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:2b871904081d3fb80dc8ddb7a816da7cf9463cd88df94f1523848981c72521e1 --body "your comment"
No comments yet. Be the first to start the discussion.