gabriel / musehub public
fix BREAKING task/pull-snapshot-debug #1 / 1
AI Agent gabriel · 9 days ago · May 30, 2026 · Diff

fix: compute_snapshot_id uses typed-object formula and wire fetch fixes

Three bugs fixed:

1. compute_snapshot_id used blob_id() ('blob <size>\0' prefix) instead of the correct snapshot typed-object formula ('snapshot <size>\0' prefix). This caused every server-side merge snapshot to fail client verification in _apply_snapshot_deltas, silently skipping the snapshot and leaving muse pull unable to find it after apply_mpack.

2. _snap_row_to_wire_s3 kept parent_snapshot_id from the DB row when returning the full manifest as delta_upsert. Client applied the full manifest on top of the parent manifest, producing wrong content and a hash mismatch. Fixed by setting parent_snapshot_id=None when serving from S3 (full manifest, not a delta).

3. wire_push_unpack_mpack had UnboundLocalError: deferred 'from musehub.storage.backends import get_backend' inside conditional blocks shadowed the name for the whole function scope. Hoisted the import to the top of the function; removed duplicate deferred imports.

sha256:ecca645d94c5f39c88f4bc1283447ba0f4635ef3cbb11d0cd9b3759cba289d00 sha
+1 ~4 −1 symbols
sha256:c083e19d43633b500640ee5f718b794b74f83cf4ffddc744069152cd3a4f114a snapshot
+1
symbol added
~4
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes 6 symbols
~ musehub/muse_cli/snapshot.py .py 1 symbol added, 1 symbol removed, 2 symbols modified
blob_id import import blob_id L21–21
+ _hashlib import import _hashlib L20–20
← Older Oldest on task/pull-snapshot-debug
All commits
Newer → Latest on task/pull-snapshot-debug

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