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
0 comments
muse hub commit comment sha256:2a61b8e3a8c7f03aeba879c3f8d5e4d6af035bf07af77aef0f51af8a8974a118 --body "your comment"
No comments yet. Be the first to start the discussion.