gabriel / muse public
test push dev
AI Agent gabriel · 114 days ago · May 16, 2026 · Diff

test(push): TDD coverage for all push gaps — force flag, mpack e2e, CLI flags, build

- Add test_push_force_flag.py (F1-F3): verifies 'force' key sent in unpack body - Add test_push_mpack_build.py (B1-B5): unit tests for build_mpack_from_walk - Add test_push_cli_flags.py (DRY1-3, DEL1-4, LEASE1-2, UP1): CLI flag coverage - Add test_push_mpack_e2e.py (E1-E2, E6-E7, V1-V3-port, VII1-port): e2e mpack path - Delete 6 stream-path test files (dead code, stream path removed in prior commit) - Excise stale stream-path tests from test_push_have_filter.py and test_push_object_integrity.py - Fix push.py: add 'force': force to unpack body in _run_mpack_path - Fix test_push_mpack_e2e.py: use shared event log for true call-order assertions

sha256:81b67d7cd1d4661770b8cef0287e7a3290e098fc3a8239480da22d4277ec8000 sha
+162 ~4 −148 symbols
sha256:d2fac538a1b9dad298a04b90648a7179bd254aaf072c01ef6e4911f7dec10c3e snapshot
+162
symbols added
~4
symbols modified
−148
symbols removed
0
dead code introduced
Semantic Changes 314 symbols
~ tests/test_push_cli_flags.py .py 48 symbols added
+ TestDelete class class TestDelete L213–285
+ test_del1_calls_delete_branch_remote method method test_del1_calls_delete_branch_remote L214–233
+ test_del2_404_treated_as_already_absent method method test_del2_404_treated_as_already_absent L235–252
+ test_del3_dry_run_skips_transport method method test_del3_dry_run_skips_transport L254–269
+ test_del4_default_branch_rejected method method test_del4_default_branch_rejected L271–285
+ TestDryRun class class TestDryRun L153–206
+ test_dry1_no_http_calls method method test_dry1_no_http_calls L154–171
+ test_dry2_output_includes_counts method method test_dry2_output_includes_counts L173–188
+ test_dry3_json_status_is_dry_run method method test_dry3_json_status_is_dry_run L190–206
+ TestForceWithLease class class TestForceWithLease L292–357
+ test_lease1_rejected_when_remote_advanced method method test_lease1_rejected_when_remote_advanced L293–323
+ test_lease2_proceeds_when_cache_matches_remote method method test_lease2_proceeds_when_cache_matches_remote L325–357
+ TestSetUpstream class class TestSetUpstream L364–387
+ test_up1_set_upstream_after_successful_push method method test_up1_set_upstream_after_successful_push L365–387
+ _bare_repo function function _bare_repo L55–66
+ _fake_httpx_client function function _fake_httpx_client L123–146
+ _fake_resp function function _fake_resp L102–108
+ _make_commit function function _make_commit L69–99
+ _mpack_push_transport function function _mpack_push_transport L111–120
+ cli variable variable cli L47–47
+ AsyncMock import import AsyncMock L25–25
+ CliRunner import import CliRunner L44–44
+ CommitRecord import import CommitRecord L35–35
+ MagicMock import import MagicMock L25–25
+ Manifest import import Manifest L43–43
+ PushResult import import PushResult L31–31
+ RemoteInfo import import RemoteInfo L31–31
+ SnapshotRecord import import SnapshotRecord L35–35
+ TransportError import import TransportError L42–42
+ __version__ import import __version__ L30–30
+ annotations import import annotations L20–20
+ blob_id import import blob_id L43–43
+ compute_commit_id import import compute_commit_id L34–34
+ compute_snapshot_id import import compute_snapshot_id L34–34
+ datetime import import datetime L22–22
+ get_head_commit_id import import get_head_commit_id L35–35
+ heads_dir import import heads_dir L33–33
+ json import import json L23–23
+ msgpack import import msgpack L27–27
+ muse_dir import import muse_dir L33–33
+ patch import import patch L25–25
+ pathlib import import pathlib L24–24
+ pytest import import pytest L28–28
+ remotes_dir import import remotes_dir L33–33
+ write_commit import import write_commit L35–35
+ write_object import import write_object L32–32
+ write_snapshot import import write_snapshot L35–35
+ runner variable variable runner L48–48
~ tests/test_push_force_flag.py .py 37 symbols added
+ _FakeHttpxClient class class _FakeHttpxClient L107–137
+ __aenter__ method async_method __aenter__ L115–116
+ __aexit__ method async_method __aexit__ L118–119
+ __init__ method method __init__ L110–113
+ post method async_method post L121–133
+ put method async_method put L135–137
+ _bare_repo function function _bare_repo L46–55
+ _fake_resp function function _fake_resp L98–104
+ _make_commit function function _make_commit L58–95
+ _run_push_stream function function _run_push_stream L140–177
+ _unpack_body function function _unpack_body L180–182
+ CommitRecord import import CommitRecord L33–33
+ MagicMock import import MagicMock L23–23
+ Manifest import import Manifest L39–39
+ PushResult import import PushResult L29–29
+ RemoteInfo import import RemoteInfo L29–29
+ SnapshotRecord import import SnapshotRecord L33–33
+ __version__ import import __version__ L28–28
+ annotations import import annotations L17–17
+ asyncio import import asyncio L19–19
+ blob_id import import blob_id L39–39
+ compute_commit_id import import compute_commit_id L32–32
+ compute_snapshot_id import import compute_snapshot_id L32–32
+ datetime import import datetime L20–20
+ heads_dir import import heads_dir L31–31
+ json import import json L21–21
+ msgpack import import msgpack L25–25
+ muse_dir import import muse_dir L31–31
+ patch import import patch L23–23
+ pathlib import import pathlib L22–22
+ pytest import import pytest L26–26
+ write_commit import import write_commit L33–33
+ write_object import import write_object L30–30
+ write_snapshot import import write_snapshot L33–33
+ test_f1_force_true_sent_in_unpack_body function function test_f1_force_true_sent_in_unpack_body L189–215
+ test_f2_force_false_sent_in_unpack_body function function test_f2_force_false_sent_in_unpack_body L222–243
+ test_f3_force_key_present_in_all_pushes function function test_f3_force_key_present_in_all_pushes L250–268
~ tests/test_push_mpack_build.py .py 28 symbols added
+ _bare_repo function function _bare_repo L44–53
+ _make_commit function function _make_commit L56–86
+ CommitRecord import import CommitRecord L31–31
+ Manifest import import Manifest L37–37
+ SnapshotRecord import import SnapshotRecord L31–31
+ __version__ import import __version__ L26–26
+ annotations import import annotations L16–16
+ blob_id import import blob_id L37–37
+ build_mpack_from_walk import import build_mpack_from_walk L27–27
+ compute_commit_id import import compute_commit_id L30–30
+ compute_snapshot_id import import compute_snapshot_id L30–30
+ datetime import import datetime L18–18
+ hashlib import import hashlib L19–19
+ heads_dir import import heads_dir L29–29
+ json import import json L20–20
+ msgpack import import msgpack L23–23
+ muse_dir import import muse_dir L29–29
+ pathlib import import pathlib L21–21
+ pytest import import pytest L24–24
+ walk_commits import import walk_commits L27–27
+ write_commit import import write_commit L31–31
+ write_object import import write_object L28–28
+ write_snapshot import import write_snapshot L31–31
+ test_b1_empty_walk_has_required_keys function function test_b1_empty_walk_has_required_keys L93–107
+ test_b2_single_commit_object_present function function test_b2_single_commit_object_present L114–150
+ test_b3_have_anchor_excludes_ancestor_commits function function test_b3_have_anchor_excludes_ancestor_commits L157–172
+ test_b4_mpack_serialises_to_valid_msgpack function function test_b4_mpack_serialises_to_valid_msgpack L179–193
+ test_b5_mpack_key_matches_push_formula function function test_b5_mpack_key_matches_push_formula L200–219
~ tests/test_push_mpack_e2e.py .py 49 symbols added
+ _CapturingClient class class _CapturingClient L118–150
+ __aenter__ method async_method __aenter__ L128–129
+ __aexit__ method async_method __aexit__ L131–132
+ __init__ method method __init__ L121–126
+ post method async_method post L134–145
+ put method async_method put L147–150
+ _UPLOAD_URL variable variable _UPLOAD_URL L53–53
+ _bare_repo function function _bare_repo L60–71
+ _fake_resp function function _fake_resp L109–115
+ _make_commit function function _make_commit L74–106
+ _push_transport function function _push_transport L153–163
+ _run_push_cli function function _run_push_cli L166–177
+ _unpack_body_of function function _unpack_body_of L180–183
+ cli variable variable cli L50–50 ← moved from tests/test_push_force_delta.py
+ AsyncMock import import AsyncMock L30–30
+ CliRunner import import CliRunner L47–47 ← moved from tests/test_push_force_delta.py
+ CommitRecord import import CommitRecord L40–40
+ MagicMock import import MagicMock L30–30
+ Manifest import import Manifest L46–46
+ PushResult import import PushResult L36–36
+ RemoteInfo import import RemoteInfo L36–36
+ SnapshotRecord import import SnapshotRecord L40–40
+ __version__ import import __version__ L35–35 ← moved from tests/test_push_no_streaming_delta.py
+ annotations import import annotations L24–24 ← moved from tests/test_push_streaming_client.py
+ asyncio import import asyncio L26–26 ← moved from tests/test_push_presign_concurrency.py
+ blob_id import import blob_id L46–46
+ compute_commit_id import import compute_commit_id L39–39
+ compute_snapshot_id import import compute_snapshot_id L39–39 ← moved from tests/test_push_object_loading.py
+ datetime import import datetime L27–27 ← moved from tests/test_push_object_loading.py
+ heads_dir import import heads_dir L38–38
+ json import import json L28–28 ← moved from tests/test_push_no_streaming_delta.py
+ msgpack import import msgpack L32–32 ← moved from tests/test_push_streaming_client.py
+ muse_dir import import muse_dir L38–38
+ patch import import patch L30–30 ← moved from tests/test_push_presign_routing.py
+ pathlib import import pathlib L29–29 ← moved from tests/test_push_object_loading.py
+ pytest import import pytest L33–33 ← moved from tests/test_push_streaming_client.py
+ remotes_dir import import remotes_dir L38–38
+ write_commit import import write_commit L40–40
+ write_object import import write_object L37–37 ← moved from tests/test_push_object_loading.py
+ write_snapshot import import write_snapshot L40–40 ← moved from tests/test_push_no_streaming_delta.py
+ runner variable variable runner L51–51 ← moved from tests/test_push_force_delta.py
+ test_e1_three_step_sequence_in_order function function test_e1_three_step_sequence_in_order L190–220
+ test_e2_presign_key_matches_put_bytes function function test_e2_presign_key_matches_put_bytes L227–249
+ test_e6_non_merge_branch_have_is_single_head function function test_e6_non_merge_branch_have_is_single_head L381–416
+ test_e7_merge_commit_branch_have_includes_all_remote_heads function function test_e7_merge_commit_branch_have_includes_all_remote_heads L423–472
+ test_v1_second_push_commits_count_is_one function function test_v1_second_push_commits_count_is_one L256–275
+ test_v2_first_push_sends_all_commits function function test_v2_first_push_sends_all_commits L282–299
+ test_v3_live_refs_anchors_bfs function function test_v3_live_refs_anchors_bfs L306–324
+ test_vii1_push_twice_second_sends_one_commit function function test_vii1_push_twice_second_sends_one_commit L331–374
~ tests/test_push_force_delta.py .py 44 symbols removed
TestBranchMergePushNoForce class class TestBranchMergePushNoForce L303–405
test_b1_push_after_branch_merge_succeeds_without_force method method test_b1_push_after_branch_merge_succeeds_without_force L308–360
test_b2_push_requires_force_when_dev_genuinely_diverged method method test_b2_push_requires_force_when_dev_genuinely_diverged L362–405
TestCollectObjectIdsCrossBranch class class TestCollectObjectIdsCrossBranch L413–458
test_c1_have_objects_excluded_even_for_non_ancestor method method test_c1_have_objects_excluded_even_for_non_ancestor L417–458
TestForcePushDelta class class TestForcePushDelta L169–295
test_a1_force_push_sends_only_new_object method method test_a1_force_push_sends_only_new_object L172–221
test_a2_force_push_no_other_branches_sends_all method method test_a2_force_push_no_other_branches_sends_all L223–251
test_a3_diverged_dev_head_excluded_other_branches_used method method test_a3_diverged_dev_head_excluded_other_branches_used L253–295
_REMOTE_URL variable variable _REMOTE_URL L74–74
_REPO_ID variable variable _REPO_ID L73–73
_bare_repo function function _bare_repo L84–97
_commit_with_manifest function function _commit_with_manifest L106–135
_objects_sent function function _objects_sent L155–161
_push_result function function _push_result L138–139
_transport_mock function function _transport_mock L142–152
_write_obj function function _write_obj L100–103
cli variable variable cli L70–70 → moved to tests/test_push_mpack_e2e.py
AsyncMock import import AsyncMock L52–52
CliRunner import import CliRunner L68–68 → moved to tests/test_push_mpack_e2e.py
CommitRecord import import CommitRecord L60–60
MagicMock import import MagicMock L52–52
Mapping import import Mapping L51–51
PushResult import import PushResult L58–58
RemoteInfo import import RemoteInfo L58–58
SnapshotRecord import import SnapshotRecord L60–60
__version__ import import __version__ L56–56
annotations import import annotations L45–45
blob_id import import blob_id L66–66
collect_object_ids import import collect_object_ids L58–58
compute_commit_id import import compute_commit_id L59–59
compute_snapshot_id import import compute_snapshot_id L59–59
datetime import import datetime L47–47
json import import json L48–48
long_id import import long_id L66–66
mock import import mock L50–50
muse_dir import import muse_dir L67–67
pathlib import import pathlib L49–49
pytest import import pytest L54–54
ref_path import import ref_path L67–67
write_commit import import write_commit L60–60
write_object import import write_object L57–57
write_snapshot import import write_snapshot L60–60
runner variable variable runner L71–71 → moved to tests/test_push_mpack_e2e.py
~ tests/test_push_no_streaming_delta.py .py 24 symbols removed
_realistic function function _realistic L110–115
_repo function function _repo L57–67
_write_commit function function _write_commit L76–107
_write_obj function function _write_obj L70–73
CommitRecord import import CommitRecord L48–48
SnapshotRecord import import SnapshotRecord L48–48
__version__ import import __version__ L45–45 → moved to tests/test_push_mpack_e2e.py
annotations import import annotations L36–36
blob_id import import blob_id L49–49
compute_commit_id import import compute_commit_id L47–47
compute_snapshot_id import import compute_snapshot_id L47–47
datetime import import datetime L38–38
inspect import import inspect L39–39
json import import json L40–40 → moved to tests/test_push_mpack_e2e.py
muse_dir import import muse_dir L50–50
pathlib import import pathlib L41–41
pytest import import pytest L43–43
write_commit import import write_commit L48–48
write_object import import write_object L46–46
write_snapshot import import write_snapshot L48–48 → moved to tests/test_push_mpack_e2e.py
test_d1_streaming_path_produces_no_delta_payloads function function test_d1_streaming_path_produces_no_delta_payloads L122–159
test_d2_successive_versions_sent_as_full_objects function function test_d2_successive_versions_sent_as_full_objects L166–198
test_d3_presign_path_may_use_delta_when_base_is_confirmed function function test_d3_presign_path_may_use_delta_when_base_is_confirmed L205–238
test_d4_structural_streaming_branch_no_delta function function test_d4_structural_streaming_branch_no_delta L245–262
~ tests/test_push_object_loading.py .py 22 symbols removed
_BLOB_SIZE variable variable _BLOB_SIZE L42–42
_FILES_CHANGED variable variable _FILES_CHANGED L41–41
_N_COMMITS variable variable _N_COMMITS L40–40
_N_FILES variable variable _N_FILES L39–39
_make_repo function function _make_repo L45–113
CommitRecord import import CommitRecord L28–28
SnapshotRecord import import SnapshotRecord L28–28
_PRESIGN_OBJECT_THRESHOLD import import _PRESIGN_OBJECT_THRESHOLD L36–36
annotations import import annotations L19–19
blob_id import import blob_id L35–35
build_push_objects import import build_push_objects L36–36
compute_commit_id import import compute_commit_id L27–27
compute_snapshot_id import import compute_snapshot_id L27–27 → moved to tests/test_push_mpack_e2e.py
datetime import import datetime L21–21 → moved to tests/test_push_mpack_e2e.py
muse_dir import import muse_dir L26–26
pathlib import import pathlib L22–22 → moved to tests/test_push_mpack_e2e.py
walk_commits import import walk_commits L25–25
write_branch_ref import import write_branch_ref L28–28
write_commit import import write_commit L28–28
write_object import import write_object L24–24 → moved to tests/test_push_mpack_e2e.py
write_snapshot import import write_snapshot L28–28
test_walk_object_count_matches_push_objects_count function function test_walk_object_count_matches_push_objects_count L116–139
~ tests/test_push_presign_concurrency.py .py 17 symbols removed
_make_obj_map function function _make_obj_map L38–42
_make_url_map function function _make_url_map L34–35
AsyncMock import import AsyncMock L19–19
MagicMock import import MagicMock L19–19
PRESIGN_PUT_CONCURRENCY import import PRESIGN_PUT_CONCURRENCY L23–23
_run_presign_puts import import _run_presign_puts L23–23
annotations import import annotations L15–15
asyncio import import asyncio L17–17 → moved to tests/test_push_mpack_e2e.py
long_id import import long_id L27–27
patch import import patch L19–19
pytest import import pytest L21–21
time import import time L18–18
test_c1_puts_are_concurrent function async_function test_c1_puts_are_concurrent L49–75
test_c2_keepalive_not_disabled function function test_c2_keepalive_not_disabled L82–103
test_c3_semaphore_caps_concurrency function async_function test_c3_semaphore_caps_concurrency L110–138
test_c4_all_objects_uploaded function async_function test_c4_all_objects_uploaded L145–165
test_c5_http_error_raises_transport_error function async_function test_c5_http_error_raises_transport_error L172–193
~ tests/test_push_presign_routing.py .py 24 symbols removed
HttpHeaders variable variable HttpHeaders L29–29
_make_objects function function _make_objects L36–45
_threshold_met function function _threshold_met L48–60
AsyncIterator import import AsyncIterator L19–19
AsyncMock import import AsyncMock L20–20
MagicMock import import MagicMock L20–20
ObjectPayload import import ObjectPayload L26–26
_PRESIGN_BYTE_THRESHOLD import import _PRESIGN_BYTE_THRESHOLD L25–25
_PRESIGN_OBJECT_THRESHOLD import import _PRESIGN_OBJECT_THRESHOLD L25–25
annotations import import annotations L17–17
long_id import import long_id L27–27
msgpack import import msgpack L22–22
patch import import patch L20–20 → moved to tests/test_push_mpack_e2e.py
pytest import import pytest L23–23
test_p8a_below_threshold_uses_stream function function test_p8a_below_threshold_uses_stream L67–69
test_p8b_object_threshold_triggers_presign function function test_p8b_object_threshold_triggers_presign L76–78
test_p8c_byte_threshold_triggers_presign function function test_p8c_byte_threshold_triggers_presign L85–89
test_p8d2_loopback_below_threshold_streams function function test_p8d2_loopback_below_threshold_streams L111–113
test_p8d3_push_py_has_no_loopback_guard function function test_p8d3_push_py_has_no_loopback_guard L120–138
test_p8d_loopback_presigns_above_threshold function function test_p8d_loopback_presigns_above_threshold L96–104
test_p8e_presign_path_sequence function async_function test_p8e_presign_path_sequence L146–202
test_p8f_stream_these_objects_not_dropped function function test_p8f_stream_these_objects_not_dropped L209–232
test_p8g_delta_objects_never_presigned function function test_p8g_delta_objects_never_presigned L239–268
test_p8g_delta_threshold_uses_only_presign_candidates function function test_p8g_delta_threshold_uses_only_presign_candidates L271–293
~ tests/test_push_streaming_client.py .py 10 symbols removed
MsgpackDict import import MsgpackDict L37–37
PushResult import import PushResult L36–36
annotations import import annotations L29–29 → moved to tests/test_push_mpack_e2e.py
inspect import import inspect L31–31
msgpack import import msgpack L33–33 → moved to tests/test_push_mpack_e2e.py
pytest import import pytest L34–34 → moved to tests/test_push_mpack_e2e.py
test_c1_push_client_does_not_unpackb_full_content function function test_c1_push_client_does_not_unpackb_full_content L44–68
test_c2_push_client_uses_unpacker_for_response function function test_c2_push_client_uses_unpacker_for_response L75–93
test_c3_push_client_parses_progress_then_result_frame function function test_c3_push_client_parses_progress_then_result_frame L100–146
test_c4_push_client_uses_streaming_http_not_buffered function function test_c4_push_client_uses_streaming_http_not_buffered L153–195
~ muse/cli/commands/push.py .py 1 symbol modified
~ tests/test_push_have_filter.py .py 6 symbols removed, 3 symbols modified
test_VII1_push_then_push_new_commit_sends_one method method test_VII1_push_then_push_new_commit_sends_one L532–564
_repo_with_two_commits method method _repo_with_two_commits L396–404
test_V1_second_push_commit_count_is_one method method test_V1_second_push_commit_count_is_one L406–427
test_V2_first_push_sends_all_commits method method test_V2_first_push_sends_all_commits L429–442
test_V3_have_from_live_remote_info method method test_V3_have_from_live_remote_info L444–458
test_VIII1_200_commit_chain_second_push_delta_is_one method method test_VIII1_200_commit_chain_second_push_delta_is_one L585–624
~ tests/test_push_object_integrity.py .py 1 symbol removed
test_i2_external_ref_in_db_but_missing_from_storage_is_rejected function function test_i2_external_ref_in_db_but_missing_from_storage_is_rejected L109–140
← 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:81b67d7cd1d4661770b8cef0287e7a3290e098fc3a8239480da22d4277ec8000 --body "your comment"