gabriel / muse public
fix patch task/fix-apply-mpack-full-manifest-snapshots #1 / 1
AI Agent gabriel · 31 days ago · May 14, 2026 · Diff

fix: handle full-manifest snapshots in apply_mpack

fetch/stream C frames send WireSnapshot dicts with a 'manifest' key, not the delta_add/delta_remove format from build_mpack. _apply_snapshot_deltas was treating all snapshots as deltas, seeing delta_add={}, producing sha256(empty) hash mismatch — causing pull to abort with 'snapshot referenced by commit' error.

Fix: detect both formats. Full-manifest (has 'manifest' key) is used directly; directories are preserved for correct snapshot_id verification and write_snapshot. Delta format is unchanged.

Return type changed from dict[str, manifest] to dict[str, (manifest, dirs)] so apply_mpack can write SnapshotRecord with correct directories.

sha256:0bd4b22157f23de32d90e4e8eb9db95569673cab0e95739a6d953e360ba2ec6b sha
sha256:a42112209a6ab5318f919906e001b59b7a3cffd5162fcd80d8d26c08e296b426 snapshot
← Older Oldest on task/fix-apply-mpack-full-manifest-snapshots
All commits
Newer → Latest on task/fix-apply-mpack-full-manifest-snapshots

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