Use MaxPackBytes not BatchMaxPack as per-fetch abort threshold

main

Commit

Soph5mo ago

BatchMaxPack controls checkpoint placement (how many batches to plan). MaxPackBytes is the user's hard abort threshold for any single source fetch. The previous code used min(BatchMaxPack, MaxPackBytes) as the per-fetch limit, which meant a batch whose actual pack exceeded the planning estimate was aborted at the source-fetch stage before the target even saw it.

With estimate-based planning, the estimate can undercount (8 KiB/commit vs linux's real ~66 KiB/commit), so a batch legitimately exceeds the planning heuristic. The fetch should still complete — if the resulting pack is too large for the target's receive-pack, the push fails and bootstrap resume handles retry. Aborting early at the source side just wastes the transfer.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com Entire-Checkpoint: 589898e25466

Checkpoints

can you review the changes in this branch

Claude CodeOpus 4.6[1m]
View session
Checkpoint 1