gabriel / muse public
fix patch clone task/clone-fetch-all-snapshots #1 / 1
gabriel · 166 days ago · Apr 14, 2026 · Diff

fix(clone): fetch objects for ALL snapshots, not just the tip

Phase 2 of clone previously only requested objects for the default commit's snapshot. muse verify walks ALL reachable commits and checks every snapshot's objects — so on a 157-commit repo, 156 historical snapshots had no objects locally and verify reported 360 failures.

Fix: collect all unique object IDs from ALL snapshots in the pack bundle, then request every missing one via /fetch/objects.

TDD: 3 new tests in TestPhase2AllSnapshotsObjectFetch confirm: - fetch_objects called with OIDs from all snapshots (not just tip) - already-local objects excluded from the request - tip-only is a strict subset of all-snapshots (sanity guard)

sha256:1490efd8a7c7e8f1de8bb655f14bbfbc9e87514326dd97c9d8c675286e114302 sha
+5 ~1 symbols
sha256:44e08ac98d0486d8ec3b94eb294434795ef2b8b91142ec6ef7fe89077cafef5a snapshot
+5
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 6 symbols
~ muse/cli/commands/clone.py .py 1 symbol modified
~ run
~ tests/test_cmd_clone_hardening.py .py 5 symbols added
+ TestPhase2AllSnapshotsObjectFetch class class TestPhase2AllSnapshotsObjectFetch L857–1019
+ _make_bundle_with_snapshots method method _make_bundle_with_snapshots L870–900
+ test_fetch_objects_called_with_all_snapshot_oids method method test_fetch_objects_called_with_all_snapshot_oids L902–952
+ test_have_objects_excluded_from_fetch method method test_have_objects_excluded_from_fetch L969–1019
+ test_tip_only_oids_not_enough method method test_tip_only_oids_not_enough L954–967
← Older Oldest on task/clone-fetch-all-snapshots
All commits
Newer → Latest on task/clone-fetch-all-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:1490efd8a7c7e8f1de8bb655f14bbfbc9e87514326dd97c9d8c675286e114302 --body "your comment"