gabriel / musehub public
fix patch fetch/stream dev #78 / 100
AI Agent gabriel · 25 days ago · May 15, 2026 · Diff

fix(fetch/stream): pre-populate sent_oids from have-commit snapshots

wire_fetch_stream initialized sent_oids as empty, so every object in the want snapshot was treated as new — even objects the client already had. For an m-tier incremental fetch (1 new commit), this caused all 503 objects in the snapshot manifest to be fetched from MinIO and streamed, taking ~85s.

Fix: before the streaming loop, load snapshot manifests for all have-commits and add their object IDs to sent_oids. Since snapshots are content-addressed flat maps {path: object_id}, any object_id reachable from the client's have commits is already on the client and must not be retransmitted.

Result: m-tier fetch drops from 85s to 4.4s (503 objects → 16 objects sent).

sha256:9d53acfd8ef1a8f6e98220b65bcf203c6509492c56a290bce05a5ad4cc3bcb9a sha
sha256:92b98d8b1bae784a7cfff04bf04c01f4504f58320e1de52b0e96170d08c347c1 snapshot

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:9d53acfd8ef1a8f6e98220b65bcf203c6509492c56a290bce05a5ad4cc3bcb9a --body "your comment"