gabriel / muse public
refactor BREAKING task/rip-legacy-pack #1 / 1
AI Agent gabriel · 161 days ago · Apr 18, 2026 · Diff

refactor: rip legacy pack API — migrate all tests to streaming (push_stream/fetch_stream)

- Delete fetch_pack, push_pack, push_objects, presign_objects, fetch_objects, filter_objects, confirm_objects, push_object_pack from transport.py - Delete test_cli_fetch_push.py (tested dead CLI wrappers) - Rebuild test_cmd_clone_hardening.py against fetch_stream + on_object callback - Migrate test_cmd_fetch_hardening.py, test_cmd_pull_hardening.py, test_cmd_push_hardening.py, test_cli_stream_push.py, test_local_file_transport.py to streaming API - Add TDD guard tests (test_transport_no_legacy_pack.py) - Replace hashlib.sha256 + long_id pattern with blob_id throughout

sha256:de342a8d505aaae8727bf72434714fba9f8893bfcd1c076440848641a8cfdcab sha
+39 ~68 −168 symbols
sha256:a556d1daff5a697bf612573e391efccb61d701176fe1d5616fc46aec99fdf62d snapshot
+39
symbols added
~68
symbols modified
−168
symbols removed
0
dead code introduced
Semantic Changes 275 symbols
+ TestHttpTransportNoLegacy class class TestHttpTransportNoLegacy L42–55
+ test_method_absent method method test_method_absent L51–55
+ TestLocalFileTransportNoLegacy class class TestLocalFileTransportNoLegacy L63–80
+ test_method_absent method method test_method_absent L76–80
+ TestMuseTransportNoLegacy class class TestMuseTransportNoLegacy L29–34
+ test_no_fetch_pack method method test_no_fetch_pack L30–34
+ TestNoDeadTypedDicts class class TestNoDeadTypedDicts L88–101
+ test_not_in_module method method test_not_in_module L97–101
+ annotations import import annotations L19–19 ← moved from tests/test_cli_fetch_push.py
+ pytest import import pytest L21–21 ← moved from tests/test_cli_fetch_push.py
~ tests/test_cli_fetch_push.py .py 77 symbols removed
− TestFetch class class TestFetch L169–368
− test_fetch_all_fetches_every_remote method method test_fetch_all_fetches_every_remote L346–368
− test_fetch_already_up_to_date method method test_fetch_already_up_to_date L261–275
− test_fetch_branch_not_on_remote_fails method method test_fetch_branch_not_on_remote_fails L222–233
− test_fetch_branch_not_on_remote_shows_available method method test_fetch_branch_not_on_remote_shows_available L235–247
− test_fetch_defaults_to_current_branch_not_upstream_name method method test_fetch_defaults_to_current_branch_not_upstream_name L190–213
− test_fetch_dry_run_writes_nothing method method test_fetch_dry_run_writes_nothing L330–344
− test_fetch_no_remote_configured_fails method method test_fetch_no_remote_configured_fails L215–220
− test_fetch_prune_current_branch_deleted_on_remote method method test_fetch_prune_current_branch_deleted_on_remote L298–328
− test_fetch_prune_removes_stale_refs method method test_fetch_prune_removes_stale_refs L277–296
− test_fetch_transport_error_propagates method method test_fetch_transport_error_propagates L249–259
− test_fetch_updates_tracking_head method method test_fetch_updates_tracking_head L170–188
− TestLocalTransportMwp2 class class TestLocalTransportMwp2 L599–678
− _make_remote method method _make_remote L602–610
− test_filter_objects_returns_missing_ids method method test_filter_objects_returns_missing_ids L612–626
− test_negotiate_acks_known_commits method method test_negotiate_acks_known_commits L650–678
− test_negotiate_returns_ready_when_no_have method method test_negotiate_returns_ready_when_no_have L639–648
− test_presign_objects_returns_all_inline method method test_presign_objects_returns_all_inline L628–637
− TestLsRemote class class TestLsRemote L541–591
− test_ls_remote_bare_url_accepted method method test_ls_remote_bare_url_accepted L577–591
− test_ls_remote_json_output method method test_ls_remote_json_output L557–571
− test_ls_remote_prints_branches method method test_ls_remote_prints_branches L542–555
− test_ls_remote_unknown_name_fails method method test_ls_remote_unknown_name_fails L573–575
− TestMwp2PackHelpers class class TestMwp2PackHelpers L686–787
− test_build_pack_only_objects_filters_correctly method method test_build_pack_only_objects_filters_correctly L693–733
− test_collect_object_ids_excludes_have method method test_collect_object_ids_excludes_have L735–787
− test_object_payload_has_content_bytes method method test_object_payload_has_content_bytes L687–691
− TestPullFastPath class class TestPullFastPath L376–408
− test_pull_skips_negotiate_and_fetch_when_already_known method method test_pull_skips_negotiate_and_fetch_when_already_known L383–408
− TestPush class class TestPush L416–533
− test_push_already_up_to_date method method test_push_already_up_to_date L509–521
− test_push_calls_filter_objects method method test_push_calls_filter_objects L429–439
− test_push_conflict_409_shows_helpful_message method method test_push_conflict_409_shows_helpful_message L497–507
− test_push_filter_objects_fallback_on_transport_error method method test_push_filter_objects_fallback_on_transport_error L467–479
− test_push_force_flag_passed_to_transport method method test_push_force_flag_passed_to_transport L523–533
− test_push_no_remote_configured_fails method method test_push_no_remote_configured_fails L481–484
− test_push_sends_commits method method test_push_sends_commits L417–427
− test_push_set_upstream_records_tracking method method test_push_set_upstream_records_tracking L486–495
− test_push_skips_upload_when_all_present method method test_push_skips_upload_when_all_present L455–465
− test_push_uploads_only_missing_objects method method test_push_uploads_only_missing_objects L441–453
− _make_bundle function function _make_bundle L98–137
− _make_remote_info function function _make_remote_info L87–95
− _push_transport_mock function function _push_transport_mock L140–161
− _sha function function _sha L42–43
− cli variable variable cli L18–18
− CliRunner import import CliRunner L15–15
− CommitRecord import import CommitRecord L23–23
− FilterObjectsResult import import FilterObjectsResult L31–31
− MPackBundle import import MPackBundle L21–21
− Manifest import import Manifest L32–32
− NegotiateResponse import import NegotiateResponse L31–31
− ObjectPayload import import ObjectPayload L21–21
− PresignResponse import import PresignResponse L31–31
− PushResult import import PushResult L21–21
− RemoteInfo import import RemoteInfo L21–21
− SnapshotRecord import import SnapshotRecord L23–23
− TransportError import import TransportError L31–31
− __version__ import import __version__ L17–17
− annotations import import annotations L6–6 → moved to tests/test_transport_no_legacy_pack.py
− compute_commit_id import import compute_commit_id L22–22
− compute_snapshot_id import import compute_snapshot_id L22–22
− datetime import import datetime L8–8
− get_head_commit_id import import get_head_commit_id L23–23
− get_remote_head import import get_remote_head L19–19
− get_upstream import import get_upstream L19–19
− hashlib import import hashlib L9–9
− json import import json L10–10
− pathlib import import pathlib L11–11
− pytest import import pytest L14–14 → moved to tests/test_transport_no_legacy_pack.py
− read_commit import import read_commit L23–23
− set_remote_head import import set_remote_head L19–19
− mock import import unittest.mock L12–12
− write_commit import import write_commit L23–23
− write_object import import write_object L20–20
− write_snapshot import import write_snapshot L23–23
− repo function function repo L47–84
− runner variable variable runner L34–34
~ muse/core/transport.py .py 17 symbols removed, 3 symbols modified
− ConfirmObjectsResponse class class ConfirmObjectsResponse L257–261
− FilterObjectsResult class class FilterObjectsResult L178–188
− _iter_object_stream method method _iter_object_stream L1033–1078
− fetch_objects method method fetch_objects L1080–1105
− fetch_pack method method fetch_pack L1015–1031
− confirm_objects method method confirm_objects L2478–2486
− fetch_objects method method fetch_objects L2070–2083
− fetch_pack method method fetch_pack L2048–2068
− filter_objects method method filter_objects L2447–2466
− presign_objects method method presign_objects L2468–2476
− push_object_pack method method push_object_pack L2407–2445
− push_objects method method push_objects L2379–2405
− push_pack method method push_pack L2146–2266
− fetch_objects method method fetch_objects L556–581
− fetch_pack method method fetch_pack L536–554
− PresignResponse class class PresignResponse L250–254
− _PushPayload class class _PushPayload L272–278
~ tests/test_cli_stream_push.py .py 16 symbols added, 12 symbols removed, 2 symbols modified
− test_objects_encoded_as_zlib_in_transport_call method method test_objects_encoded_as_zlib_in_transport_call L353–376
− TestT6HttpTransportEncoding class class TestT6HttpTransportEncoding L451–558
− _frames_sent method method _frames_sent L454–507
− test_commit_pack_frame_present method method test_commit_pack_frame_present L533–543
− test_first_frame_is_header method method test_first_frame_is_header L509–512
− test_header_contains_branch method method test_header_contains_branch L514–517
− test_header_force_field method method test_header_force_field L519–522
− test_last_frame_is_end method method test_last_frame_is_end L545–549
− test_object_frames_present method method test_object_frames_present L524–531
− test_zlib_object_enc_field method method test_zlib_object_enc_field L551–558
− hashlib import import hashlib L18–18
− long_id import import long_id L33–33
+ test_objects_passed_as_raw_to_transport method method test_objects_passed_as_raw_to_transport L352–382
+ TestT6MPackFrameEncoding class class TestT6MPackFrameEncoding L457–631
+ _build_frames method method _build_frames L475–533
+ test_commit_pack_contains_commit method method test_commit_pack_contains_commit L597–603
+ test_commit_pack_frame_present method method test_commit_pack_frame_present L587–595
+ test_end_frame_object_count method method test_end_frame_object_count L611–617
+ test_first_frame_is_header method method test_first_frame_is_header L535–538
+ test_frame_order_h_o_c_e method method test_frame_order_h_o_c_e L619–631
+ test_header_contains_branch method method test_header_contains_branch L540–543
+ test_header_force_field method method test_header_force_field L545–548
+ test_header_have_list method method test_header_have_list L550–554
+ test_last_frame_is_end method method test_last_frame_is_end L605–609
+ test_raw_object_content_compressable method method test_raw_object_content_compressable L565–575
+ test_raw_object_frame_present method method test_raw_object_frame_present L556–563
+ test_zlib_object_enc_field_preserved method method test_zlib_object_enc_field_preserved L577–585
+ blob_id import import blob_id L32–32
~ tests/test_cmd_clone_hardening.py .py 3 symbols added, 9 symbols removed, 33 symbols modified
− TestPhase2AllSnapshotsObjectFetch class class TestPhase2AllSnapshotsObjectFetch L857–1019
− _make_bundle_with_snapshots method method _make_bundle_with_snapshots L870–900
− test_fetch_objects_called_with_all_snapshot_oids method method test_fetch_objects_called_with_all_snapshot_oids L902–952
− test_have_objects_excluded_from_fetch method method test_have_objects_excluded_from_fetch L969–1019
− test_tip_only_oids_not_enough method method test_tip_only_oids_not_enough L954–967
− _invoke_run method method _invoke_run L284–320
− _base_patches function function _base_patches L273–280
− _make_bundle function function _make_bundle L70–72
− call import import call L48–48
+ _invoke_run function function _invoke_run L281–317
+ _make_fetch_stream_result function function _make_fetch_stream_result L101–110
+ blob_id import import blob_id L54–54
~ patch
~ tests/test_cmd_fetch_hardening.py .py 3 symbols added, 1 symbol removed, 14 symbols modified
~ tests/test_cmd_pull_hardening.py .py 2 symbols added, 2 symbols removed, 6 symbols modified
− test_fetch_pack_error_to_stderr method method test_fetch_pack_error_to_stderr L321–332
− hashlib import import hashlib L60–60
+ test_fetch_stream_error_to_stderr method method test_fetch_stream_error_to_stderr L321–332
+ blob_id import import blob_id L69–69
~ _run
~ _sha
~ tests/test_cmd_push_hardening.py .py 1 symbol added, 17 symbols removed, 4 symbols modified
− test_presign_retries_constant_defined method method test_presign_retries_constant_defined L184–188
− TestStress class class TestStress L745–833
− test_concurrent_push_objects_as_packs_isolated method method test_concurrent_push_objects_as_packs_isolated L792–833
− test_push_objects_as_packs_1000 method method test_push_objects_as_packs_1000 L747–771
− test_upload_presigned_retries_exhaust_raises method method test_upload_presigned_retries_exhaust_raises L774–789
− TestUploadChunk class class TestUploadChunk L349–359
− test_progress_goes_to_stderr method method test_progress_goes_to_stderr L350–359
− TestUploadPresigned class class TestUploadPresigned L289–346
− test_all_retries_exhausted_raises method method test_all_retries_exhausted_raises L338–346
− test_non_retriable_4xx_propagated_immediately method method test_non_retriable_4xx_propagated_immediately L323–336
− test_retries_on_503 method method test_retries_on_503 L308–321
− test_success_no_retry method method test_success_no_retry L295–306
− filter_objects method method filter_objects L388–396
− presign_objects method method presign_objects L398–400
− push_object_pack method method push_object_pack L406–408
− push_objects method method push_objects L402–404
− push_pack method method push_pack L410–418
+ push_stream method method push_stream L310–329
~ tests/test_core_transport.py .py 7 symbols removed
− TestHttpTransportFetchPack class class TestHttpTransportFetchPack L498–532
− test_http_409_raises_transport_error method method test_http_409_raises_transport_error L526–532
− test_posts_to_fetch_endpoint method method test_posts_to_fetch_endpoint L499–524
− TestHttpTransportPushPack class class TestHttpTransportPushPack L535–569
− test_force_flag_sent method method test_force_flag_sent L551–559
− test_posts_to_push_endpoint method method test_posts_to_push_endpoint L536–549
− test_push_rejected_raises_transport_error method method test_push_rejected_raises_transport_error L561–569
~ tests/test_local_file_transport.py .py 4 symbols added, 26 symbols removed, 6 symbols modified
− TestFetchPack class class TestFetchPack L218–245
− test_empty_want_returns_empty_bundle method method test_empty_want_returns_empty_bundle L228–234
− test_have_excludes_already_known_commits method method test_have_excludes_already_known_commits L236–245
− test_returns_pack_bundle_for_wanted_commit method method test_returns_pack_bundle_for_wanted_commit L219–226
− test_fetch_pack_after_push method method test_fetch_pack_after_push L488–502
− TestPushPack class class TestPushPack L253–353
− _minimal_bundle method method _minimal_bundle L254–292
− test_fast_forward_check_rejects_diverged_push method method test_fast_forward_check_rejects_diverged_push L320–330
− test_force_flag_overrides_fast_forward_check method method test_force_flag_overrides_fast_forward_check L332–341
− test_push_creates_new_branch method method test_push_creates_new_branch L343–353
− test_push_result_includes_all_branch_heads method method test_push_result_includes_all_branch_heads L311–318
− test_push_updates_ref_file method method test_push_updates_ref_file L303–309
− test_successful_push_returns_ok method method test_successful_push_returns_ok L294–301
− TestPushPackSecurity class class TestPushPackSecurity L361–444
− _bundle method method _bundle L365–372
− _remote method method _remote L362–363
− test_backslash_branch_rejected method method test_backslash_branch_rejected L397–402
− test_cr_lf_branch_rejected method method test_cr_lf_branch_rejected L404–410
− test_double_dot_branch_rejected method method test_double_dot_branch_rejected L383–388
− test_empty_branch_rejected method method test_empty_branch_rejected L412–417
− test_null_byte_branch_rejected method method test_null_byte_branch_rejected L390–395
− test_path_traversal_branch_rejected method method test_path_traversal_branch_rejected L374–381
− test_symlink_in_heads_dir_cannot_escape method method test_symlink_in_heads_dir_cannot_escape L419–444
− test_fetch_pack_large_bundle method method test_fetch_pack_large_bundle L600–616
− MPackBundle import import MPackBundle L40–40
− RemoteInfo import import RemoteInfo L40–40
+ test_fetch_stream_after_push method method test_fetch_stream_after_push L285–296
+ test_fetch_stream_large_bundle method method test_fetch_stream_large_bundle L384–400
+ _push function function _push L245–268
+ build_mpack import import build_mpack L33–33
← Older Oldest on task/rip-legacy-pack
All commits
Newer → Latest on task/rip-legacy-pack

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:de342a8d505aaae8727bf72434714fba9f8893bfcd1c076440848641a8cfdcab --body "your comment"