fix: wire clone — all snapshots + bounded R2 concurrency
Two fixes for muse clone correctness and speed:
1. wire_fetch returns ALL snapshots (not just tip) - The 'lazy fetch' comment was aspirational — never implemented - muse verify walks all commits and fails on every missing snapshot - Fix: collect all snapshot IDs from all returned commits and batch-load - Snapshot manifests are small (path→hash) so sending all is safe
2. _pack_objects_response bounded to 32 concurrent R2 GETs - Unbounded asyncio.gather on 665 objects floods R2 → rate limits + OOM - Fix: asyncio.Semaphore(32) caps concurrent backend.get() calls - All objects still returned; peak memory and R2 load stay bounded
TDD: 8 tests covering both behaviours, all green.
sha256:cc96d33afd14450354ddf00bad3f1996c588aee01c3fc7c5f2d359562afc9c2d
sha
+42
~2
symbols
sha256:6a0e77075c7f475bb524897a6496d3391725e98e41612ce8168948449337d798
snapshot
+42
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
44 symbols
+
test_clone_then_verify_all_snapshots_present
function
async_function test_clone_then_verify_all_snapshots_present L200–243
+
test_wire_fetch_have_excludes_snapshots_for_known_commits
function
async_function test_wire_fetch_have_excludes_snapshots_for_known_commits L156–196
+
test_wire_fetch_returns_all_snapshots_not_just_tip
function
async_function test_wire_fetch_returns_all_snapshots_not_just_tip L116–152
+
test_fetch_objects_all_correct_with_bounded_concurrency
function
async_function test_fetch_objects_all_correct_with_bounded_concurrency L164–194
+
test_fetch_objects_bounded_concurrency
function
async_function test_fetch_objects_bounded_concurrency L102–160
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:cc96d33afd14450354ddf00bad3f1996c588aee01c3fc7c5f2d359562afc9c2d --body "your comment"
No comments yet. Be the first to start the discussion.