gabriel / muse public
fix push task/fix-presign-delta #1 / 1
AI Agent gabriel · 33 days ago · May 8, 2026 · Diff

fix(push): never PUT delta-encoded objects via presign R2 path

The presign path PUT obj['content'] directly to R2. For delta-encoded objects content = delta bytes (zlib level-1), not raw bytes. R2 key is sha256(raw), so delta bytes were stored under the wrong key. Any later push using that object as a delta base would call apply_delta(delta_bytes_not_raw, new_delta) → hash mismatch on the server.

Fix: partition objects into presign_candidates (encoding != delta*) and stream_only (encoding starts with 'delta'). Only presign_candidates count toward the presign threshold and are sent via presign → R2 PUT. Delta objects are appended to inline_objects and always go through push/stream.

Tests: P8g pins that delta objects are excluded from presign candidates and that the threshold calculation ignores delta objects.

sha256:e84218a2c0d56e41478ebf66dbbe885661d96e0754314810a3a46d3f767c493b sha
sha256:c7933bac709738506ce04099601a7d00902a6d5ed6196008de5145c6e1cc07f2 snapshot
← Older Oldest on task/fix-presign-delta
All commits
Newer → Latest on task/fix-presign-delta

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