gabriel / musehub public
fix patch task/fix-ghost-guard-presign-timeout #1 / 1
AI Agent gabriel · 50 days ago · Apr 30, 2026 · Diff

fix: skip sequential ghost guard for presigned pushes

Phase C ghost guard was running O(n) sequential backend.exists() calls for every externally-referenced object. In a presigned push all objects are external (none in _objects_in_push), causing 5908 sequential R2 HEAD requests for the muse repo — enough to hit the CF timeout before the ref could be updated.

Fix: skip the ghost guard entirely when _objects_in_push is empty (pure presign path — wire_push_confirm already verified R2 presence at confirm time). For inline-object pushes, run the check in parallel with a 50-slot semaphore instead of sequentially.

sha256:991c735af464517d231ac3124044509d1c8f72b644442c4a5ab6bf32ca140d1b sha
sha256:a3c246b4c9acfc0fd0f27943dfe5255b355243c0a14707dc3024ac0eee5826f2 snapshot
← Older Oldest on task/fix-ghost-guard-presign-timeout
All commits
Newer → Latest on task/fix-ghost-guard-presign-timeout

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