gabriel / muse public
fix patch fix/fetch-presign-524 #1 / 1
AI Agent gabriel · 2 days ago · Jun 12, 2026 · Diff

fix: try fetch/presign before fetch/mpack to avoid Cloudflare 524 on large repos

fetch/mpack builds the full mpack synchronously on the server — for repos with 200+ commits and 700+ files this exceeds Cloudflare's 100s origin timeout, producing a 524 and empty clone.

fetch/presign returns commits and snapshots inline plus a presigned GET URL per blob. Zero blob bytes are loaded server-side, so the POST completes in seconds regardless of repo size. The client downloads blobs in parallel from R2 with a 32-worker ThreadPoolExecutor, typically faster than inline mpack for large repos.

Falls back to fetch/mpack if the server returns 404/405 (older server without the endpoint) or None (presign not supported).

sha256:2eaa5d95f9d9383498e76947410a26e5a3ba23d182f339910c424cf88fad412b sha
+1 ~2 symbols
1078 changed · 1078 in snapshot files
sha256:956d05cafb6e78263f8d527aa56f90a7aa17e8bab79b8b80317b27f26dc73177 snapshot
+1
symbol added
~2
symbols modified
1078
files changed
1078
files in snapshot
0
dead code introduced
Semantic Changes 3 symbols
~ muse/core/transport.py .py 1 symbol added, 2 symbols modified
+ _fetch_via_presign method method _fetch_via_presign L775–872
Files Changed
+1078
1078 in snapshot
+ .coverage .coverage
+ .museattributes .museattributes
+ .museignore .museignore
+ CLAUDE.md .md
+ README.md .md
+ dev-setup.sh .sh
+ pyproject.toml .toml
← Older Oldest on fix/fetch-presign-524
All commits
Newer → Latest on fix/fetch-presign-524

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