gabriel / musehub public
feat patch task/fetch-bundle-wire #1 / 1
AI Agent gabriel · 31 days ago · May 11, 2026 · Diff

feat: wire_fetch_bundle — single-bundle fetch path (issue #47)

Add FetchBundleResult TypedDict and wire_fetch_bundle function to musehub_wire.py.

The function: - BFS-walks the commit DAG (same logic as wire_fetch_presign) - Collects all snapshots + objects for the delta - Loads object bytes from storage in parallel (semaphore=50) - Assembles one MPackBundle: {commits, snapshots, objects, branch_heads} - bundle_id = sha256(bundle_bytes) — the content-addressing proof - Returns inline bytes for small bundles (presign=False) - Returns presigned GET URL for large bundles (presign=True, threshold=500 obj / 50 MB)

6 TDD tests (FB0–FB5) cover: single-commit bundle, sha256 proof, bundle contents, have-cut delta, empty want, and per-object integrity.

sha256:2873ab55a3a0fcccc6cba6c9f7c94787b15c06f10108c80252eebb4d4ec12286 sha
sha256:e54168dbedac30666d710cbc663f410e6ede7770702bb4173826b60ba234008e snapshot
← Older Oldest on task/fetch-bundle-wire
All commits
Newer → Latest on task/fetch-bundle-wire

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:2873ab55a3a0fcccc6cba6c9f7c94787b15c06f10108c80252eebb4d4ec12286 --body "your comment"