can you take a look at https://github.com/entireio/git-sync/issues/70
- User
can you take a look at https://github.com/entireio/git-sync/issues/70
Assistant· claude-opus-4-8
I'll fetch the issue.
Assistant· claude-opus-4-8
Let me explore the codebase to understand how pushes work.
Assistant· claude-opus-4-8
Let me look at how the bootstrap strategy streams data and the push implementation.
Assistant· claude-opus-4-8
Let me check whether 408 is handled anywhere in the retry/syncer layer and how
--target-max-pack-bytesis wired.Assistant· claude-opus-4-8
- User
let's implement the fix in a new branch, do meaningful commits, run /simplify when done
Assistant· claude-opus-4-8
Let me create the branch and look at existing tests for the classifier functions to mirror their style.
Assistant· claude-opus-4-8
Now I understand the patterns. Let me implement. First, the classifier helpers and wiring (commit 1).
Assistant· claude-opus-4-8
Now the mid-batch subdivision path:
Assistant· claude-opus-4-8
Now let me add tests for the classifier and the auto-batch-on-timeout path before committing. Let me check the existing one-shot retry test exists:
Assistant· claude-opus-4-8
Let me add classifier tests right after
TestIsTargetBodyLimitError:Assistant· claude-opus-4-8
Commit 1:
Assistant· claude-opus-4-8
Now commit 2: messaging. Let me update the one-shot retry notice and add an actionable error when batching is impossible.
Assistant· claude-opus-4-8
Now add the
actionableTargetPushErrorhelper near the classifiers:Assistant· claude-opus-4-8
Now tests for the messaging behavior. Let me add a non-batching source fake and two tests:
Assistant· claude-opus-4-8
The embedded source needs a
fetchPack. Let me fix the test:Assistant· claude-opus-4-8
Full build/test and vet:
Assistant· claude-opus-4-8
All passing. Commit 2:
Assistant· claude-opus-4-8
Now run
/simplifyon the diff.Assistant· claude-opus-4-8
I'll gather the diff and launch the four review agents in parallel.
Assistant· claude-opus-4-8
The reviews converge: the code is clean and consistent with the package's existing
isTargetBodyLimitErrorpattern. The only in-scope, actionable item is Finding 2 (simplification):TestIsBatchableTargetPushErrorlargely re-tests edge cases already owned by the two per-predicate tests. I'll trim it to just confirm the OR wiring.Everything else I'm skipping deliberately:
- Reuse / efficiency: clean — double
ToLoweris cold-path-only, not worth restructuring the predicates. - Altitude (typed gitproto HTTP error via
errors.As): a real but separate cleanup that would require refactoring the pre-existing 413 path and threading status throughhttpError; scope creep for this fix. Worth a follow-up ticket, not this diff.
- Reuse / efficiency: clean — double
Assistant· claude-opus-4-8
Done. Here's the summary.
What I shipped
Branch , three commits:
- User
would the unify http status a bigger effort, or can we do it as part of this PR?
Assistant· claude-opus-4-8
Let me actually assess the effort by tracing how the error flows and what the 413 path needs beyond a status code.
Assistant· claude-opus-4-8
Bigger — and bigger than it first looks. I traced it:
What's genuinely easy:
httpError(smarthttp.go:39) is the only producer of"http %d"errors, and%w-wrapping preserves the chain all the way up throughPushPackand theTargetPusherinterface to bootstrap. So a typed set in that one constructor would be reachable via downstream. The 408/504 check becomes a clean .- User
can you create a PR
Assistant· claude-opus-4-8
PR created: https://github.com/entireio/git-sync/pull/75
- Base
main←fix/target-push-timeout-batched-retry, 3 commits. - Linked to issue #70 via "Fixes #70" — it'll auto-close on merge.
- Body covers the root cause (GitHub's receive-pack deadline + slow relay), the change, the tests, and the typed-error follow-up we discussed (explicitly scoped out, with the reasoning).
Want me to also post the workaround (
--target-max-pack-bytes) as a comment on #70 so the reporter is unblocked before this merges, or open the follow-up issue for the HTTP-status unification?- Base
- User
can you look at the copilot comments?
Assistant· claude-opus-4-8
Three Copilot comments — all consistency nits about wording/naming that drifted now that the path handles timeouts, not just rejections. nodo approved. Let me apply all three.
Assistant· claude-opus-4-8
Now the
sizeIssuerename (comment 2). Let me see its scope:Assistant· claude-opus-4-8
Now comment 3 — the actionable error wording:
Assistant· claude-opus-4-8
Let me check the doc comment above that function still reads right, then build/test:
Assistant· claude-opus-4-8
Pushed. Let me note the resolution on the PR:
Assistant· claude-opus-4-8
Done. Copilot left 3 inline comments (nodo already approved). All three were the same class of issue — wording/naming that became misleading once this path started handling timeouts, not just size rejections — and I addressed each in commit
02883917:- Log message (
:189) — "after target rejection" → "after batchable push failure". Thereasonfield already logs the specific cause. sizeIssuevariable (:511) — renamed tosubdivide, since it's now true for deadline timeouts too; keyed on the shared remedy instead of implying a size-only cause.- Actionable error (
:1493) — "rejected the pack" → "could not receive the pack — too large, or too slow to receive within its deadline".
Build/vet/tests green, pushed, and I posted a summary comment on the PR mapping each fix to its comment. No code-behavior changes — purely the consistency cleanups Copilot flagged.
- Log message (
- User
changelog /changelog
Assistant· claude-opus-4-8
I'll generate a changelog entry. First, let me gather the data. You didn't specify a version number — let me look at the current state and recent history to propose one.
Assistant· claude-opus-4-8
PR #75 shows as merged. Let me verify the actual state and check what's already covered in the existing
[Unreleased]section.Assistant· claude-opus-4-8
PR #75 is merged. All four PRs (#71, #73, #74, #75) belong in this release; the existing
[Unreleased]text covers #71/#73 but without PR links, and #74/#75 aren't there yet. Both contributors (nodo, Soph) are internal, so no Thanks section. No version was given — since #71 adds new public API, this is a minor bump → 0.7.0.Let me grab #74's details to write its bullet accurately.
Assistant· claude-opus-4-8
I have everything. Both contributors are internal, today is 2026-06-16, and #75 merged today. I'll convert the
[Unreleased]section into[0.7.0], add PR links to the existing #71/#73 bullets, and add #74 and #75 to Fixed.Assistant· claude-opus-4-8
I need to read the file first.
Assistant· claude-opus-4-8
Done. I generated the 0.7.0 changelog entry (dated 2026-06-16).
What I did
- No version was passed, so I inferred 0.7.0 — a minor bump, since #71 adds new public API surface (
RefRejectedError/ErrTargetRefMoved). - The existing
[Unreleased]section already described #71 and #73 but had no PR links — I promoted it to[0.7.0]and appended the links. - Added the two PRs missing from the section: #74 (empty pack on pack-less ref creates) and #75 (408/504 timeout → batched fallback), both under Fixed.
Entry contents
- Added — #71: typed push-rejection errors on the public API
- Fixed — #73 (value-vs-pointer
errors.Asclassification), #74 (subsumed-branch pack-less create), #75 (receive-pack timeout batching) - No Thanks section — both contributors (Andrea Nodari, Stefan Haubold) are internal .
- No version was passed, so I inferred 0.7.0 — a minor bump, since #71 adds new public API surface (