gabriel / musehub public
feat BREAKING pack-fetch dev
AI Agent gabriel · 122 days ago · May 15, 2026 · Diff

feat(pack-fetch): Phase 3 — pack-based fetch returns presigned pack URLs

wire_fetch_bundle now queries musehub_pack_index for distinct pack_ids covering the needed objects. When coverage is 100%, returns presigned GET URLs for the push-time bundles instead of fetching N objects individually from MinIO — reducing fetch round-trips to O(distinct packs).

- Extend FetchBundleResult with pack_fetch, pack_urls, commits, snapshots - Add step 3a: pack index coverage check in wire_fetch_bundle - Add presign_bundle_get to BlobBackend (S3 presigned GET for bundles) - Add PF-1..4 TDD tests (all green, 12/12 passing across phases 1-3)

sha256:0e57608ae6b9f42358be2017649f98fd9cc509ba99c346dfbdb84de5bfaf9e59 sha
+21 ~4 symbols
sha256:0edad367a69566400f4cd314c24e5a2e6caf4aa774e8cab911050fbd6e3d4e21 snapshot
+21
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 25 symbols
~ tests/test_pack_fetch_phase3.py .py 20 symbols added
+ _make_bundle function function _make_bundle L37–54
+ _make_commit_chain function function _make_commit_chain L103–142
+ _push_and_index function async_function _push_and_index L63–100
+ _store_bundle function async_function _store_bundle L57–60
+ AsyncSession import import AsyncSession L25–25
+ annotations import import annotations L17–17
+ blob_id import import blob_id L27–27
+ compute_identity_id import import compute_identity_id L29–29
+ create_repo import import create_repo L30–30
+ datetime import import datetime L19–19
+ db import import db L28–28
+ hashlib import import hashlib L20–20
+ msgpack import import msgpack L22–22
+ pytest import import pytest L23–23
+ select import import select L24–24
+ session_add_all function async_function session_add_all L352–354
+ test_pf1_fetch_returns_pack_urls function async_function test_pf1_fetch_returns_pack_urls L150–177
+ test_pf2_pack_urls_count_equals_distinct_packs function async_function test_pf2_pack_urls_count_equals_distinct_packs L185–223
+ test_pf3_pack_fetch_includes_commit_and_snapshot_metadata function async_function test_pf3_pack_fetch_includes_commit_and_snapshot_metadata L231–261
+ test_pf4_fallback_to_inline_when_no_pack_index function async_function test_pf4_fallback_to_inline_when_no_pack_index L269–349
~ musehub/storage/backends.py .py 1 symbol added, 1 symbol modified
+ presign_bundle_get method async_method presign_bundle_get L373–387
← Older Oldest on dev
All commits
Newer → Latest on dev

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:0e57608ae6b9f42358be2017649f98fd9cc509ba99c346dfbdb84de5bfaf9e59 --body "your comment"