gabriel / muse public
fix minor task/fix-silent-snapshot-skip #1 / 1
gabriel · 66 days ago · Apr 8, 2026 · Diff

fix: build_pack raises ValueError on missing snapshot instead of silently skipping

Root cause of recurring snapshot corruption: build_pack and build_pack_from_walk were logging a warning and continuing when a commit's snapshot was absent locally. This allowed pushes to succeed with commits that had no corresponding snapshot on the remote. After a local .muse wipe + pull, the commits came back but the snapshots were permanently gone — the remote never received them.

Fix: both functions now raise ValueError immediately when any snapshot required by a commit being sent is absent. Push fails loudly; the store is auditable via 'muse verify' before data is lost.

Proof tests: - test_snapshot_always_included_for_every_commit: every commit_id in the bundle has its snapshot_id present in the snapshots list - test_missing_snapshot_raises_not_skips: orphaned commit (snapshot file absent) causes ValueError with 'Push aborted' message, not a silent skip

sha256:2a61b8e3a8c7f03aeba879c3f8d5e4d6af035bf07af77aef0f51af8a8974a118 sha
sha256:13fef25ea78543cd9cd3b705c94cf7d64b7e5f59c6b55809e77003c33e27d29d snapshot
← Older Oldest on task/fix-silent-snapshot-skip
All commits
Newer → Latest on task/fix-silent-snapshot-skip

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