fix(checkpoint): push git-refs checkpoints in bounded chunks
Commit
The pre-push hook pushed every queued checkpoint ref in one git push.
On Windows that command line passes the 32,767-character CreateProcess
limit at ~340 refs (each refspec is ~95 characters), so the batch failed
before git started and every push fell back to per-ref retries that drain
only a few dozen refs per 2-minute budget (#2986). Elsewhere a large
backlog or a stalled connection could hold the user's push with no bound.
- Push queued refs at most 200 per
git push(~19k characters), each chunk's queue entries removed as soon as it lands. - Share one checkpointFlushBudget across the batch and the per-ref
fallback in pre-push; the explicit pushes (migration,
entire checkpoint push) leave the batch unbounded. - A failed chunk no longer stops later chunks; only its refs are retried individually. Batching stops after 2 consecutive failed chunks, an SSH auth failure, the budget, or an interrupt.
- Stop after one attempt when git cannot connect at all (connect-phase ssh/curl failures before anything landed), printing that line with credentials redacted.
- Add
-o ConnectTimeout=60for OpenSSH under the pre-push hook. - Move the free-text credential redaction helper into gitremote.
Fixes #2986
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M6KY7E0R66FBEWZE73TYEC7N