gabriel / muse public
fix patch push dev
AI Agent gabriel · 144 days ago · Apr 26, 2026 · Diff

fix(push): send only delta objects on force push; fix remote-not-configured test isolation

Remove the 'if force: have = []' branch that cleared all have-anchors on force push, causing collect_object_ids to walk the entire object graph and resend every object even when the server already held most of them via other branches. Force push now uses the same have-filter as normal push: exclude commits that don't exist locally (diverged remote history) while keeping all shared ancestry as exclusion anchors.

Fix two TestErrorRouting tests that failed on authenticated systems because muse init auto-wires local/staging/production remotes when a handle is resolved. Patch resolve_default_handle to return None during init so the test repos have a truly empty remote config, exercising the '(none)' and 'lists existing remotes' branches correctly.

Add test_push_force_delta.py with 6 TDD tests covering: - force push sends only new objects when other branches share history - force push sends all objects when repo has no other branches - diverged remote head is excluded; other branches still used as have-anchors - normal push after branch-merge-cycle succeeds without --force - push correctly requires --force when dev genuinely diverged - collect_object_ids excludes have-objects even for non-ancestor branches

sha256:949599cdf8cc39ef78600d9a9aa33788331d99c4bcc830616f7fa4389f44eabd sha
+40 ~4 symbols
sha256:43c46b2050097df0fca786400664773a64b784d504f63ce013dae4fcf1df75ef snapshot
+40
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 44 symbols
~ tests/test_push_force_delta.py .py 40 symbols added
+ TestBranchMergePushNoForce class class TestBranchMergePushNoForce L305–408
+ test_b1_push_after_branch_merge_succeeds_without_force method method test_b1_push_after_branch_merge_succeeds_without_force L310–362
+ test_b2_push_requires_force_when_dev_genuinely_diverged method method test_b2_push_requires_force_when_dev_genuinely_diverged L364–408
+ TestCollectObjectIdsCrossBranch class class TestCollectObjectIdsCrossBranch L416–461
+ test_c1_have_objects_excluded_even_for_non_ancestor method method test_c1_have_objects_excluded_even_for_non_ancestor L420–461
+ TestForcePushDelta class class TestForcePushDelta L171–297
+ test_a1_force_push_sends_only_new_object method method test_a1_force_push_sends_only_new_object L174–223
+ test_a2_force_push_no_other_branches_sends_all method method test_a2_force_push_no_other_branches_sends_all L225–253
+ test_a3_diverged_dev_head_excluded_other_branches_used method method test_a3_diverged_dev_head_excluded_other_branches_used L255–297
+ _REMOTE_URL variable variable _REMOTE_URL L72–72
+ _REPO_ID variable variable _REPO_ID L71–71
+ _bare_repo function function _bare_repo L84–97
+ _commit_with_manifest function function _commit_with_manifest L106–136
+ _objects_sent function function _objects_sent L157–163
+ _push_result function function _push_result L139–140
+ _sha function function _sha L80–81
+ _transport_mock function function _transport_mock L143–154
+ _write_obj function function _write_obj L100–103
+ cli variable variable cli L68–68
+ AsyncMock import import AsyncMock L51–51
+ CliRunner import import CliRunner L66–66
+ CommitRecord import import CommitRecord L59–59
+ PushResult import import PushResult L57–57
+ RemoteInfo import import RemoteInfo L57–57
+ SnapshotRecord import import SnapshotRecord L59–59
+ __version__ import import __version__ L55–55
+ annotations import import annotations L45–45
+ blob_id import import blob_id L65–65
+ collect_object_ids import import collect_object_ids L57–57
+ compute_commit_id import import compute_commit_id L58–58
+ compute_snapshot_id import import compute_snapshot_id L58–58
+ datetime import import datetime L47–47
+ json import import json L48–48
+ mock import import mock L50–50
+ pathlib import import pathlib L49–49
+ pytest import import pytest L53–53
+ write_commit import import write_commit L59–59
+ write_object import import write_object L56–56
+ write_snapshot import import write_snapshot L59–59
+ runner variable variable runner L69–69
~ muse/cli/commands/push.py .py 1 symbol modified
~ run
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:949599cdf8cc39ef78600d9a9aa33788331d99c4bcc830616f7fa4389f44eabd --body "your comment"