bootstrap: treat receive-pack timeouts (408/504) as batchable

main

Commit

Soph2mo ago

GitHub kills a receive-pack POST with HTTP 408 when a slow or oversized push outlasts its server-side deadline — the failure mode in #70, where a large GitLab repo relayed over a slow link timed out before the single one-shot pack finished. Only body-limit rejections (413) previously triggered the batched-bootstrap fallback, so a 408 hard-failed with no remediation despite --target-max-pack-bytes being the exact fix.

Classify 408 (and gateway 504) as a receive-pack deadline and route it through the same batched retry as a size rejection: smaller packs each finish inside the target's window. Applied both to the one-shot auto-batch decision and the mid-batch subdivision path.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: bacf4c249e3c

Checkpoints

can you take a look at https://github.com/entireio/git-sync/issues/70

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1