gabriel / musehub public
fix patch task/fix-snapshot-heal-on-push #1 / 1
AI Agent gabriel · 119 days ago · May 17, 2026 · Diff

fix: heal snapshot rows missing delta_blob on re-push

Snapshot rows created before delta storage was added have delta_blob=NULL and parent_snapshot_id=NULL. The dedup-skip meant they were never updated, so fetch always sent the full manifest from manifest_blob with parent=None. Combined with _coerce_snapshot_dict stripping delta fields on the client, pull produced hash-mismatched empty snapshots.

Server fix: when a snapshot exists but has delta_blob=NULL, use INSERT ON CONFLICT DO UPDATE to backfill delta_blob and parent_snapshot_id from the new push data. The WHERE clause ensures already-correct rows are never clobbered.

sha256:8f42679d0bc41404a3349e5bd0999f5aa75e60f23a4c1377ea97d18d35963712 sha
+5 ~10 −5 symbols
sha256:1536b79f74aceafe0b5ab5fc555be8399642101ce94c5208390d692e21504895 snapshot
+5
symbols added
~10
symbols modified
−5
symbols removed
0
dead code introduced
Semantic Changes 20 symbols
~ musehub/models/wire.py .py 1 symbol added, 1 symbol removed, 1 symbol modified
_check_manifest_values method method _check_manifest_values L177–188
+ _check_delta_add_values method method _check_delta_add_values L183–194
~ musehub/services/musehub_wire.py .py 3 symbols added, 3 symbols removed, 7 symbols modified
_snapshot_identity_bytes function function _snapshot_identity_bytes L166–170
_to_wire_snapshot function async_function _to_wire_snapshot L355–363
_muse_snapshot_identity_bytes import import _muse_snapshot_identity_bytes L80–80
+ _reconstruct_manifest function async_function _reconstruct_manifest L165–217
+ _snap_row_to_wire function function _snap_row_to_wire L402–438
+ _sa_text import import _sa_text L50–50
~ func
~ select
~ tests/test_wire_mpack_unpack_step3_tiers4567.py .py 1 symbol added, 1 symbol removed, 1 symbol modified
test_t5_job_row_written_with_correct_payload function async_function test_t5_job_row_written_with_correct_payload L230–252
+ test_t5_unpack_returns_correct_shape function async_function test_t5_unpack_returns_correct_shape L220–235
← Older Oldest on task/fix-snapshot-heal-on-push
All commits
Newer → Latest on task/fix-snapshot-heal-on-push

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