gabriel / musehub public
fix patch fix/presign-tip-only #1 / 1
AI Agent gabriel · 5 days ago · Jun 12, 2026 · Diff

fix: fetch/presign tip-only blob coverage + timing instrumentation

The old fetch/presign computed all_oids as the union of every blob across every historical snapshot — O(commits x files). For gabriel/muse with 200+ commits and 700+ files that meant unpacking 200+ manifests, computing thousands of unique OIDs, and generating thousands of presigned URLs, all within a single synchronous request that hit Cloudflare's 100s origin timeout.

Fix: only generate presigned URLs for blobs in the TIP snapshot (current HEAD). This bounds the presign set to N files regardless of history depth. Historical blobs are lazy-fetched on demand. Fresh clones get a working tree from tip; muse diff on old commits will need a subsequent fetch.

Also adds logger.warning timing at every step (commit_walk, commit_rows, snap_ids, tip_oids, have_oids, size_query, wire_commits, wire_snaps, presign gather, DONE) so any future timeout produces a complete step trace.

sha256:f4f731efef3f1cef7eeea99f8d5f49159110ec5c48137d9273b79e60a5aadf35 sha
~1 symbols
1 changed · 970 in snapshot files
sha256:8b87f26f829bfc0f12a21d85fcaeaefbc51f786bbb25f8fd25a5c043c781d8eb snapshot
~1
symbol modified
1
file changed
970
files in snapshot
0
dead code introduced
Semantic Changes 1 symbol
Files Changed
~1
970 in snapshot
← Older Oldest on fix/presign-tip-only
All commits
Newer → Latest on fix/presign-tip-only

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