gabriel / muse public
push-have-negotiation.md markdown
40 lines 1.8 KB
Raw
sha256:c0eba5ad689cec79f4a3fcdc4f5da78556cb4b8cb7b330f944634356c10379ed chore: pivot to nightly channel — bump version to 0.2.0.dev… Sonnet 5 patch 13 days ago

muse push — have-negotiation ignores sibling refs on remote

Background

When pushing a branch to a remote, the push negotiation computes blobs_to_send by comparing the local tip against the remote's tip for that specific branch only. It does not account for objects already present on the remote via other refs.

Observed behaviour

After pushing dev to staging successfully (17 commits, 46 blobs), pushing main to the same staging remote attempted to upload 1,375 commits and 379 MB of data — failing with [Errno 32] Broken pipe.

Local main is staging/dev + one merge commit. The merge-base of local main and local dev is exactly dev's tip (sha256:f9828e…). All objects are already present on staging from the dev push. Only the merge commit itself needs to go over the wire.

Root cause

The "have" set used during push negotiation is scoped to the target branch's remote tip. Objects reachable from other remote refs (e.g. staging/dev) are not included in the have set, so the delta computation over-counts blobs_to_send by treating already-uploaded objects as missing.

Expected behaviour

blobs_to_send should be computed against the union of all objects reachable from all refs present on the remote — not just the branch being pushed. When main is a direct descendant of dev and dev is already on the remote, the push for main should send only the new commits and their net-new objects (in this case, one merge commit and zero new blobs).

Impact

  • Pushes to branches that lag behind a sibling ref on the same remote become disproportionately large.
  • Large packs time out or hit broken-pipe errors even when no new data is needed.
  • Workaround: push the most-advanced branch first (e.g. dev), then accept that main may still require a large redundant upload until this is fixed.
File History 3 commits
sha256:c287f599c5429903a139eadf3c5db5d930520e57cb0c3c575d9570e953c3b2d6 chore: bump version to 0.2.0.dev2 — nightly.2 Sonnet 4.6 patch 12 days ago
sha256:8de4334a98c945aace420969d389ad678aa926d4ab4e886b2ac4c4241cb3bf2b revert: keep pyproject.toml in canonical PEP 440 form Sonnet 4.6 patch 15 days ago
sha256:50bb615c573aa4b928fca75b60f82ba2a659910066507cec6a95c412ae22ccb9 docs: add issue docs for push have-negotiation bug (#55) an… Sonnet 4.6 18 days ago