fix
patch
push
task/fix-cross-remote-have
#1 / 1
fix(push): restrict have-set to target remote only
_all_known_have_anchors() reads tracking refs from ALL configured remotes and was included in candidate_have. When pushing to a fresh remote (e.g. staging on first push), the have-set included commits from other remotes (e.g. local/dev). The object walk stopped at those commits, excluding their objects from the bundle. The server rejected with 422: missing snapshot objects that the target had never received.
Fix: candidate_have = list(remote_branch_heads.values()) only. The live /refs response is the authoritative truth about what the target remote holds. Cross-remote anchors are never safe to assume.
TDD: TestIXCrossRemoteContamination in test_push_have_filter.py.
sha256:c25fd3b61d1ee65e396f1c85c5febc6b00f37e9d82e33c5be73f4e43c1f0c672
sha
+5
~1
symbols
sha256:6bc2b6989ddd1c22b47ce01c1b9c8cbd8cb2c35e36c443273b8bd67524b705b4
snapshot
+5
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes
6 symbols
~
run
+
test_IX1_all_known_have_anchors_returns_cross_remote_refs
method
method test_IX1_all_known_have_anchors_returns_cross_remote_refs L706–716
+
test_IX2_fresh_target_remote_produces_empty_have_set
method
method test_IX2_fresh_target_remote_produces_empty_have_set L718–746
+
test_IX3_target_with_known_head_includes_that_commit
method
method test_IX3_target_with_known_head_includes_that_commit L748–769
← Older
Oldest on task/fix-cross-remote-have
All commits
Newer →
Latest on task/fix-cross-remote-have
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:c25fd3b61d1ee65e396f1c85c5febc6b00f37e9d82e33c5be73f4e43c1f0c672 --body "your comment"
No comments yet. Be the first to start the discussion.