gabriel / musehub public
fix patch phase1 task/phase1-zstd-decompress-fix #1 / 1
AI Agent gabriel · 24 days ago · May 17, 2026 · Diff

fix(phase1): decompress zstd objects from covering mpack before serving

_extract_from_mpack was reading raw bytes from the push mpack without checking the 'encoding' field. Push mpacks store objects with encoding='zstd' and compressed content, but object IDs are sha256 of *decompressed* bytes. Serving compressed bytes caused the muse client's integrity check (sha256(content) == oid) to fail, all objects to be skipped, and muse apply_mpack to leave HEAD unadvanced — resulting in 0 commits visible after every l/xl clone.

Fix: check encoding field in _extract_from_mpack; decompress zstd content before placing in mpack_hits.

Also adds: - FN-7 regression test: zstd-compressed objects in covering mpack must be decompressed before appearing in the assembled fetch mpack - _make_mpack_bytes_zstd() test helper that builds realistic push mpacks - Verbose diagnostic logging in _walk_commit_delta and wire_fetch_mpack to expose gen_range, graph hits, snap_ids, and presigned URL on every fetch — confirms server assembles 1000 commits/snapshots correctly - Restore _wait_indexed clone_dir variable (was shadowed by inline name)

sha256:56cbc136427d1e5cd1a711151b9bde9c8f7dbc65985a34761b4171a5d3ac4722 sha
sha256:fb71859eb956ec8aca49675f171bffd033cf433907af03b5e3a103e315cc4f7d snapshot
← Older Oldest on task/phase1-zstd-decompress-fix
All commits
Newer → Latest on task/phase1-zstd-decompress-fix

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