gabriel / muse public
feat BREAKING task/mpack-protocol #4 / 4
AI Agent gabriel · 163 days ago · Apr 17, 2026 · Diff

feat: implement MPack streaming protocol

- muse/core/mpack.py: frame TypedDicts (H/O/C/E/P/X/R/A), MPackStreamWriter, MPackStreamReader, canonical header payload for Ed25519 signing - muse/core/compression.py: zstd tier (ZSTD_AVAILABLE, compress_zstd, decompress_zstd, choose_compression, compress_and_encode, decompress_frame) - muse/core/pack.py: PackBundle→MPackBundle, MPackSummary, build_pack→build_mpack, apply_pack→apply_mpack, build_pack_from_walk→build_mpack_from_walk - verify_pack.py: fix hash comparison to use sha256: prefix - All pack→mpack renames across cli commands, transport, and tests - New test files: test_mpack_frames, test_mpack_stream, test_mpack_compression, test_mpack_bundle, test_mpack_perf, test_mpack_core, test_mpack_oserror_integrity, test_mpack_snapshot_integrity, test_mpack_cmd_verify, test_mpack_cmd_pack_unpack, test_mpack_perf_ops (134 tests, all green)

sha256:c11cb724941394fe22fc4098467f086fc40746b50cee62615fc5a59fb8539660 sha
+631 ~194 −31 symbols
sha256:f4ff0348e05982ae890650da0d03b6db4b5f07a10dd5928bd3c05a88fd1b6902 snapshot
+631
symbols added
~194
symbols modified
−31
symbols removed
0
dead code introduced
Semantic Changes 856 symbols
~ muse/core/mpack.py .py 39 symbols added
+ FRAME_ACK variable variable FRAME_ACK L113–113
+ FRAME_COMMIT_PACK variable variable FRAME_COMMIT_PACK L108–108
+ FRAME_END variable variable FRAME_END L109–109
+ FRAME_ERROR variable variable FRAME_ERROR L111–111
+ FRAME_HEADER variable variable FRAME_HEADER L106–106
+ FRAME_OBJECT variable variable FRAME_OBJECT L107–107
+ FRAME_PROGRESS variable variable FRAME_PROGRESS L110–110
+ FRAME_RESULT variable variable FRAME_RESULT L112–112
+ MPACK_CONTENT_TYPE variable variable MPACK_CONTENT_TYPE L103–103
+ MPACK_VERSION variable variable MPACK_VERSION L102–102
+ MPackAckFrame class class MPackAckFrame L234–244
+ MPackCommitPackFrame class class MPackCommitPackFrame L179–184
+ MPackEndFrame class class MPackEndFrame L187–197
+ MPackErrorFrame class class MPackErrorFrame L212–221
+ MPackHeaderFrame class class MPackHeaderFrame L126–157
+ MPackObjectFrame class class MPackObjectFrame L160–176
+ MPackProgressFrame class class MPackProgressFrame L200–209
+ MPackResultFrame class class MPackResultFrame L224–231
+ MPackStreamReader class class MPackStreamReader L646–744
+ __init__ method method __init__ L675–686
+ decompress_object method method decompress_object L714–744
+ feed method method feed L688–696
+ frames method method frames L698–712
+ MPackStreamWriter class class MPackStreamWriter L297–638
+ write_ack method method write_ack L618–638
+ write_commit_pack method method write_commit_pack L521–539
+ write_end method method write_end L541–558
+ write_error method method write_error L579–592
+ write_header method method write_header L324–413
+ write_object method method write_object L479–519
+ write_object_raw method method write_object_raw L415–477
+ write_progress method method write_progress L564–577
+ write_result method method write_result L594–616
+ _ALL_FRAME_TAGS variable variable _ALL_FRAME_TAGS L115–118
+ _canonical_header_payload function function _canonical_header_payload L252–289
+ Iterator import import Iterator L94–94
+ TypedDict import import TypedDict L94–94
+ annotations import import annotations L92–92
+ msgpack import import msgpack L96–96
~ tests/test_mpack_bundle.py .py 43 symbols added
+ TestApplyMpack class class TestApplyMpack L224–270
+ test_empty_bundle_is_noop method method test_empty_bundle_is_noop L245–251
+ test_idempotent method method test_idempotent L235–243
+ test_pack_bomb_rejected method method test_pack_bomb_rejected L253–260
+ test_returns_apply_result method method test_returns_apply_result L262–270
+ test_round_trip method method test_round_trip L225–233
+ TestBuildMpack class class TestBuildMpack L146–216
+ test_empty_commit_ids_returns_empty_bundle method method test_empty_commit_ids_returns_empty_bundle L177–182
+ test_have_exclusion method method test_have_exclusion L156–164
+ test_multi_commit_chain method method test_multi_commit_chain L194–204
+ test_objects_have_sha256_prefixed_ids method method test_objects_have_sha256_prefixed_ids L184–192
+ test_raises_on_missing_snapshot method method test_raises_on_missing_snapshot L166–175
+ test_single_commit method method test_single_commit L147–154
+ test_summary_populated method method test_summary_populated L206–216
+ TestMPackBundleTypedDict class class TestMPackBundleTypedDict L76–114
+ test_exists method method test_exists L77–79
+ test_has_branch_heads_field method method test_has_branch_heads_field L105–109
+ test_has_commits_field method method test_has_commits_field L81–85
+ test_has_objects_field method method test_has_objects_field L93–97
+ test_has_snapshots_field method method test_has_snapshots_field L87–91
+ test_has_tags_field method method test_has_tags_field L99–103
+ test_pack_bundle_no_longer_exists method method test_pack_bundle_no_longer_exists L111–114
+ TestMPackSummary class class TestMPackSummary L122–138
+ test_exists method method test_exists L123–125
+ test_has_branch_fields method method test_has_branch_fields L134–138
+ test_has_required_advisory_fields method method test_has_required_advisory_fields L127–132
+ _DT variable variable _DT L31–31
+ _commit function function _commit L50–68
+ _init_repo function function _init_repo L38–47
+ _sha function function _sha L34–35
+ CommitRecord import import CommitRecord L28–28
+ SnapshotRecord import import SnapshotRecord L28–28
+ annotations import import annotations L18–18
+ compute_commit_id import import compute_commit_id L27–27
+ compute_snapshot_id import import compute_snapshot_id L27–27
+ datetime import import datetime L20–20
+ hashlib import import hashlib L21–21
+ json import import json L22–22
+ pathlib import import pathlib L23–23
+ pytest import import pytest L25–25
+ write_commit import import write_commit L28–28
+ write_object import import write_object L29–29
+ write_snapshot import import write_snapshot L28–28
~ tests/test_mpack_cmd_pack_unpack.py .py 55 symbols added
+ TestPackObjects class class TestPackObjects L104–179
+ test_dry_run_head method method test_dry_run_head L138–146
+ test_dry_run_returns_json method method test_dry_run_returns_json L126–136
+ test_have_prunes_old_commits method method test_have_prunes_old_commits L148–157
+ test_head_no_commits_errors method method test_head_no_commits_errors L171–174
+ test_invalid_have_id_rejected method method test_invalid_have_id_rejected L164–169
+ test_invalid_want_id_rejected method method test_invalid_want_id_rejected L159–162
+ test_no_traceback_on_bad_want method method test_no_traceback_on_bad_want L176–179
+ test_pack_explicit_commit method method test_pack_explicit_commit L116–124
+ test_pack_head method method test_pack_head L105–114
+ TestPackObjectsSecurity class class TestPackObjectsSecurity L286–320
+ test_200_sequential_dry_run method method test_200_sequential_dry_run L313–320
+ test_ansi_in_want_rejected method method test_ansi_in_want_rejected L301–305
+ test_dry_run_json_has_expected_keys method method test_dry_run_json_has_expected_keys L287–299
+ test_empty_want_list_errors method method test_empty_want_list_errors L307–311
+ TestStress class class TestStress L257–278
+ test_200_unpack_idempotency_rounds method method test_200_unpack_idempotency_rounds L270–278
+ test_5_commit_chain_pack method method test_5_commit_chain_pack L258–268
+ TestUnpackObjects class class TestUnpackObjects L187–249
+ test_corrupted_msgpack_errors method method test_corrupted_msgpack_errors L235–238
+ test_empty_stdin_treated_as_empty_pack method method test_empty_stdin_treated_as_empty_pack L240–244
+ test_idempotent_double_unpack method method test_idempotent_double_unpack L202–213
+ test_json_shorthand method method test_json_shorthand L215–223
+ test_no_traceback_on_corrupt_input method method test_no_traceback_on_corrupt_input L246–249
+ test_round_trip method method test_round_trip L188–200
+ test_text_format method method test_text_format L225–233
+ TestUnpackObjectsSecurity class class TestUnpackObjectsSecurity L323–368
+ test_format_error_to_stderr method method test_format_error_to_stderr L324–329
+ test_full_round_trip_with_objects method method test_full_round_trip_with_objects L336–353
+ test_no_traceback_on_bad_format method method test_no_traceback_on_bad_format L331–334
+ test_no_traceback_on_invalid_msgpack method method test_no_traceback_on_invalid_msgpack L365–368
+ test_unpack_text_output_format method method test_unpack_text_output_format L355–363
+ _commit function function _commit L53–72
+ _make_repo function function _make_repo L32–39
+ _po function function _po L80–86
+ _set_head function function _set_head L75–77
+ _snap function function _snap L42–50
+ _uo function function _uo L89–96
+ CliRunner import import CliRunner L23–23
+ CommitRecord import import CommitRecord L20–20
+ ExitCode import import ExitCode L18–18
+ InvokeResult import import InvokeResult L23–23
+ Manifest import import Manifest L22–22
+ SnapshotRecord import import SnapshotRecord L20–20
+ annotations import import annotations L10–10
+ compute_commit_id import import compute_commit_id L19–19
+ compute_snapshot_id import import compute_snapshot_id L19–19
+ datetime import import datetime L12–12
+ json import import json L13–13
+ msgpack import import msgpack L16–16
+ pathlib import import pathlib L14–14
+ write_commit import import write_commit L20–20
+ write_object import import write_object L21–21
+ write_snapshot import import write_snapshot L20–20
+ runner variable variable runner L25–25
~ tests/test_mpack_cmd_verify.py .py 98 symbols added
+ TestCommitConsistency class class TestCommitConsistency L337–372
+ _commit_entry method method _commit_entry L338–339
+ test_commit_entry_not_dict method method test_commit_entry_not_dict L362–372
+ test_commit_missing_snapshot_fails method method test_commit_missing_snapshot_fails L352–360
+ test_commit_with_bundled_snapshot method method test_commit_with_bundled_snapshot L341–350
+ TestJsonOutputClean class class TestJsonOutputClean L159–196
+ test_empty_bundle method method test_empty_bundle L160–170
+ test_json_shorthand method method test_json_shorthand L181–186
+ test_multiple_good_objects method method test_multiple_good_objects L188–196
+ test_single_good_object method method test_single_good_object L172–179
+ TestMalformedInput class class TestMalformedInput L472–514
+ test_commits_not_a_list method method test_commits_not_a_list L508–514
+ test_malformed_msgpack method method test_malformed_msgpack L473–477
+ test_missing_file method method test_missing_file L487–489
+ test_msgpack_scalar method method test_msgpack_scalar L479–485
+ test_objects_not_a_list method method test_objects_not_a_list L491–498
+ test_snapshots_not_a_list method method test_snapshots_not_a_list L500–506
+ TestObjectIntegrity class class TestObjectIntegrity L203–274
+ test_bad_hash_detected method method test_bad_hash_detected L204–212
+ test_binary_object_passes method method test_binary_object_passes L268–274
+ test_empty_object_passes method method test_empty_object_passes L259–266
+ test_entry_not_dict method method test_entry_not_dict L238–249
+ test_invalid_object_id_format method method test_invalid_object_id_format L224–236
+ test_missing_content_field method method test_missing_content_field L251–257
+ test_mix_good_and_bad method method test_mix_good_and_bad L214–222
+ TestQuietMode class class TestQuietMode L452–465
+ test_quiet_clean_exits_zero_no_output method method test_quiet_clean_exits_zero_no_output L453–458
+ test_quiet_failure_exits_nonzero_no_output method method test_quiet_failure_exits_nonzero_no_output L460–465
+ TestSchemas class class TestSchemas L128–152
+ test_failure_fields method method test_failure_fields L129–133
+ test_format_choices method method test_format_choices L150–152
+ test_stat_result_fields method method test_stat_result_fields L146–148
+ test_verify_pack_result_fields method method test_verify_pack_result_fields L135–144
+ TestSecurity class class TestSecurity L521–583
+ test_ansi_in_object_id_sanitized_in_text method method test_ansi_in_object_id_sanitized_in_text L530–538
+ test_deeply_nested_msgpack method method test_deeply_nested_msgpack L573–583
+ test_format_error_to_stderr method method test_format_error_to_stderr L522–528
+ test_json_output_encodes_ansi_safely method method test_json_output_encodes_ansi_safely L554–565
+ test_no_traceback_on_corrupt_bundle method method test_no_traceback_on_corrupt_bundle L547–552
+ test_no_traceback_on_invalid_format method method test_no_traceback_on_invalid_format L540–545
+ test_path_traversal_in_bundle_file method method test_path_traversal_in_bundle_file L567–571
+ TestSnapshotConsistency class class TestSnapshotConsistency L281–330
+ _snap_entry method method _snap_entry L282–283
+ test_skip_local_check_allows_missing method method test_skip_local_check_allows_missing L318–330
+ test_snapshot_entry_not_dict method method test_snapshot_entry_not_dict L306–316
+ test_snapshot_missing_object_fails method method test_snapshot_missing_object_fails L295–304
+ test_snapshot_with_all_objects_present method method test_snapshot_with_all_objects_present L285–293
+ TestStatMode class class TestStatMode L406–445
+ test_stat_counts_all_sections method method test_stat_counts_all_sections L434–445
+ test_stat_does_not_verify_hashes method method test_stat_does_not_verify_hashes L425–432
+ test_stat_json method method test_stat_json L407–416
+ test_stat_text method method test_stat_text L418–423
+ TestStress class class TestStress L590–638
+ test_200_sequential_verifications method method test_200_sequential_verifications L612–617
+ test_500_object_bundle method method test_500_object_bundle L591–599
+ test_500_object_bundle_one_corrupt method method test_500_object_bundle_one_corrupt L601–610
+ test_large_object_hashing method method test_large_object_hashing L619–628
+ test_stat_on_large_bundle method method test_stat_on_large_bundle L630–638
+ TestTextFormat class class TestTextFormat L379–399
+ test_text_format_clean method method test_text_format_clean L380–385
+ test_text_format_counts method method test_text_format_counts L394–399
+ test_text_format_failure_shows_fail method method test_text_format_failure_shows_fail L387–392
+ _BadObjectEntry variable variable _BadObjectEntry L58–58
+ _BundleDict variable variable _BundleDict L59–59
+ _CommitEntry class class _CommitEntry L51–53
+ _CommitEntryDict variable variable _CommitEntryDict L57–57
+ _EnvMap variable variable _EnvMap L56–56
+ _ObjectEntry class class _ObjectEntry L41–43
+ _SnapshotEntry class class _SnapshotEntry L46–48
+ _bad_hash_obj function function _bad_hash_obj L91–92
+ _env function function _env L79–80
+ _good_obj function function _good_obj L87–88
+ _init_repo function function _init_repo L66–76
+ _make_bundle function function _make_bundle L95–105
+ _sha function function _sha L83–84
+ _vp function function _vp L108–121
+ CliRunner import import CliRunner L22–22
+ CommitRecord import import CommitRecord L30–30
+ InvokeResult import import InvokeResult L22–22
+ Manifest import import Manifest L31–31
+ SnapshotRecord import import SnapshotRecord L30–30
+ TypedDict import import TypedDict L32–32
+ _FORMAT_CHOICES import import _FORMAT_CHOICES L24–24
+ _Failure import import _Failure L24–24
+ _StatResult import import _StatResult L24–24
+ _VerifyPackResult import import _VerifyPackResult L24–24
+ annotations import import annotations L11–11
+ datetime import import datetime L13–13
+ hashlib import import hashlib L14–14
+ io import import io L15–15
+ json import import json L16–16
+ msgpack import import msgpack L20–20
+ pathlib import import pathlib L17–17
+ pytest import import pytest L21–21
+ uuid import import uuid L18–18
+ write_commit import import write_commit L30–30
+ write_snapshot import import write_snapshot L30–30
+ runner variable variable runner L34–34
~ tests/test_mpack_compression.py .py 30 symbols added
+ TestChooseCompression class class TestChooseCompression L85–102
+ test_matches_zstd_available method method test_matches_zstd_available L96–102
+ test_returns_string method method test_returns_string L86–89
+ test_returns_valid_encoding method method test_returns_valid_encoding L91–94
+ TestCompressAndEncode class class TestCompressAndEncode L110–139
+ test_compress_and_encode_returns_bytes_and_enc method method test_compress_and_encode_returns_bytes_and_enc L111–116
+ test_compress_and_encode_round_trip method method test_compress_and_encode_round_trip L118–123
+ test_decompress_frame_raw method method test_decompress_frame_raw L131–134
+ test_decompress_frame_unknown_enc_raises method method test_decompress_frame_unknown_enc_raises L136–139
+ test_decompress_frame_zlib method method test_decompress_frame_zlib L125–129
+ TestCompressionRatio class class TestCompressionRatio L147–180
+ test_zstd_at_least_as_good_as_zlib_on_source method method test_zstd_at_least_as_good_as_zlib_on_source L148–158
+ test_zstd_faster_than_zlib_on_large_payload method method test_zstd_faster_than_zlib_on_large_payload L160–180
+ TestDecompressErrors class class TestDecompressErrors L188–199
+ test_corrupt_zlib_raises method method test_corrupt_zlib_raises L189–192
+ test_corrupt_zstd_raises method method test_corrupt_zstd_raises L194–199
+ TestZstdAvailableFlag class class TestZstdAvailableFlag L25–37
+ test_zstd_available_is_bool method method test_zstd_available_is_bool L26–28
+ test_zstd_available_reflects_import method method test_zstd_available_reflects_import L30–37
+ TestZstdRoundTrip class class TestZstdRoundTrip L45–77
+ test_1mb_payload method method test_1mb_payload L64–67
+ test_binary_data method method test_binary_data L59–62
+ test_compress_returns_bytes method method test_compress_returns_bytes L69–72
+ test_decompress_returns_bytes method method test_decompress_returns_bytes L74–77
+ test_empty_bytes method method test_empty_bytes L46–48
+ test_single_byte method method test_single_byte L50–52
+ test_source_code method method test_source_code L54–57
+ annotations import import annotations L13–13
+ pytest import import pytest L17–17
+ zlib import import zlib L15–15
~ tests/test_mpack_core.py .py 43 symbols added
+ TestApplyPack class class TestApplyPack L245–333
+ test_apply_preserves_commit_metadata method method test_apply_preserves_commit_metadata L298–316
+ test_apply_returns_new_object_count method method test_apply_returns_new_object_count L318–333
+ test_empty_bundle_is_noop method method test_empty_bundle_is_noop L293–296
+ test_idempotent_apply method method test_idempotent_apply L270–281
+ test_malformed_object_skipped method method test_malformed_object_skipped L283–291
+ test_round_trip method method test_round_trip L246–268
+ TestBuildPack class class TestBuildPack L93–237
+ test_deduplicates_shared_objects method method test_deduplicates_shared_objects L148–159
+ test_empty_commit_ids_returns_empty_bundle method method test_empty_commit_ids_returns_empty_bundle L161–164
+ test_have_excludes_ancestor_commits method method test_have_excludes_ancestor_commits L133–146
+ test_merge_commit_includes_both_parents method method test_merge_commit_includes_both_parents L212–237
+ test_missing_commit_skipped_gracefully method method test_missing_commit_skipped_gracefully L166–169
+ test_missing_snapshot_raises_not_skips method method test_missing_snapshot_raises_not_skips L191–210
+ test_multi_commit_chain method method test_multi_commit_chain L119–131
+ test_object_content_is_raw_bytes method method test_object_content_is_raw_bytes L107–117
+ test_single_commit_no_history method method test_single_commit_no_history L94–105
+ test_snapshot_always_included_for_every_commit method method test_snapshot_always_included_for_every_commit L171–189
+ _make_commit function function _make_commit L65–85
+ _make_object function function _make_object L50–55
+ _make_snapshot function function _make_snapshot L58–62
+ CommitRecord import import CommitRecord L21–21
+ MPackBundle import import MPackBundle L12–12
+ Manifest import import Manifest L20–20
+ ObjectPayload import import ObjectPayload L12–12
+ SnapshotRecord import import SnapshotRecord L21–21
+ annotations import import annotations L3–3
+ apply_mpack import import apply_mpack L12–12
+ build_mpack import import build_mpack L12–12
+ compute_commit_id import import compute_commit_id L18–18
+ compute_snapshot_id import import compute_snapshot_id L18–18
+ datetime import import datetime L5–5
+ has_object import import has_object L11–11
+ json import import json L6–6
+ pathlib import import pathlib L7–7
+ pytest import import pytest L9–9
+ read_commit import import read_commit L21–21
+ read_object import import read_object L11–11
+ read_snapshot import import read_snapshot L21–21
+ write_commit import import write_commit L21–21
+ write_object import import write_object L11–11
+ write_snapshot import import write_snapshot L21–21
+ repo function function repo L37–47
~ tests/test_mpack_frames.py .py 70 symbols added
+ TestCanonicalHeaderPayload class class TestCanonicalHeaderPayload L273–328
+ test_contains_version method method test_contains_version L291–298
+ test_covers_all_signing_fields method method test_covers_all_signing_fields L300–308
+ test_deterministic_across_calls method method test_deterministic_across_calls L310–316
+ test_different_inputs_produce_different_payloads method method test_different_inputs_produce_different_payloads L318–328
+ test_is_valid_msgpack method method test_is_valid_msgpack L282–289
+ test_returns_bytes method method test_returns_bytes L274–280
+ TestConstants class class TestConstants L22–81
+ test_frame_ack_tag_is_A method method test_frame_ack_tag_is_A L79–81
+ test_frame_commit_pack_tag_is_C method method test_frame_commit_pack_tag_is_C L59–61
+ test_frame_end_tag_is_E method method test_frame_end_tag_is_E L63–65
+ test_frame_error_tag_is_X method method test_frame_error_tag_is_X L71–73
+ test_frame_header_tag_is_H method method test_frame_header_tag_is_H L51–53
+ test_frame_object_tag_is_O method method test_frame_object_tag_is_O L55–57
+ test_frame_progress_tag_is_P method method test_frame_progress_tag_is_P L67–69
+ test_frame_result_tag_is_R method method test_frame_result_tag_is_R L75–77
+ test_frame_tags_are_distinct method method test_frame_tags_are_distinct L42–49
+ test_frame_tags_are_single_uppercase_ascii method method test_frame_tags_are_single_uppercase_ascii L31–40
+ test_mpack_content_type method method test_mpack_content_type L27–29
+ test_mpack_version method method test_mpack_version L23–25
+ TestDocstring class class TestDocstring L336–354
+ _doc method method _doc L337–339
+ test_documents_compression method method test_documents_compression L353–354
+ test_documents_content_type method method test_documents_content_type L347–348
+ test_documents_frame_sequence method method test_documents_frame_sequence L341–342
+ test_documents_mpack_version method method test_documents_mpack_version L344–345
+ test_documents_provenance method method test_documents_provenance L350–351
+ TestMPackAckFrame class class TestMPackAckFrame L260–265
+ test_has_ack_common_ready method method test_has_ack_common_ready L261–265
+ TestMPackCommitPackFrame class class TestMPackCommitPackFrame L203–212
+ test_exists method method test_exists L204–206
+ test_has_required_fields method method test_has_required_fields L208–212
+ TestMPackEndFrame class class TestMPackEndFrame L215–228
+ test_exists method method test_exists L216–218
+ test_has_n_commits_for_integrity_check method method test_has_n_commits_for_integrity_check L225–228
+ test_has_n_objects_for_integrity_check method method test_has_n_objects_for_integrity_check L220–223
+ TestMPackErrorFrame class class TestMPackErrorFrame L244–249
+ test_has_msg_and_code method method test_has_msg_and_code L245–249
+ TestMPackHeaderFrame class class TestMPackHeaderFrame L89–157
+ test_exists method method test_exists L90–92
+ test_has_agent_id_field method method test_has_agent_id_field L129–132
+ test_has_branch_field method method test_has_branch_field L109–112
+ test_has_domains_field method method test_has_domains_field L149–152
+ test_has_have_field method method test_has_have_field L154–157
+ test_has_model_id_field method method test_has_model_id_field L134–137
+ test_has_n_commits_field method method test_has_n_commits_field L119–122
+ test_has_n_objects_field method method test_has_n_objects_field L114–117
+ test_has_objects_bytes_field method method test_has_objects_bytes_field L124–127
+ test_has_op_field method method test_has_op_field L104–107
+ test_has_signature_field method method test_has_signature_field L144–147
+ test_has_signer_key_field method method test_has_signer_key_field L139–142
+ test_has_t_field method method test_has_t_field L94–97
+ test_has_version_field method method test_has_version_field L99–102
+ TestMPackObjectFrame class class TestMPackObjectFrame L160–200
+ test_exists method method test_exists L161–163
+ test_has_content_field method method test_has_content_field L175–178
+ test_has_dom_field method method test_has_dom_field L191–195
+ test_has_enc_field method method test_has_enc_field L180–183
+ test_has_id_field method method test_has_id_field L170–173
+ test_has_path_field method method test_has_path_field L197–200
+ test_has_sz_field method method test_has_sz_field L185–189
+ test_has_t_field method method test_has_t_field L165–168
+ TestMPackProgressFrame class class TestMPackProgressFrame L231–241
+ test_has_msg_field method method test_has_msg_field L238–241
+ test_has_pct_field method method test_has_pct_field L232–236
+ TestMPackResultFrame class class TestMPackResultFrame L252–257
+ test_has_ok_msg_heads_head method method test_has_ok_msg_heads_head L253–257
+ annotations import import annotations L11–11
+ get_type_hints import import get_type_hints L14–14
+ msgpack import import msgpack L13–13
~ tests/test_mpack_oserror_integrity.py .py 29 symbols added
+ TestApplyPackOsErrorIntegrity class class TestApplyPackOsErrorIntegrity L104–219
+ test_apply_pack_commits_written_excludes_integrity_violation method method test_apply_pack_commits_written_excludes_integrity_violation L154–168
+ test_apply_pack_continues_after_integrity_violation method method test_apply_pack_continues_after_integrity_violation L137–152
+ test_apply_pack_does_not_crash_on_store_integrity_violation method method test_apply_pack_does_not_crash_on_store_integrity_violation L106–118
+ test_apply_pack_logs_critical_on_store_integrity_violation method method test_apply_pack_logs_critical_on_store_integrity_violation L120–135
+ test_apply_pack_valid_commit_no_integrity_violation method method test_apply_pack_valid_commit_no_integrity_violation L192–200
+ test_apply_pack_wrong_hash_raises_valuerror_not_oserror method method test_apply_pack_wrong_hash_raises_valuerror_not_oserror L202–219
+ test_impostor_file_not_overwritten_by_apply_pack method method test_impostor_file_not_overwritten_by_apply_pack L170–190
+ _TS variable variable _TS L48–48
+ _bundle_with_commits function function _bundle_with_commits L78–79
+ _make_commit_record function function _make_commit_record L60–75
+ _make_repo function function _make_repo L51–57
+ _write_impostor_file function function _write_impostor_file L82–97
+ CommitDict import import CommitDict L39–39
+ CommitRecord import import CommitRecord L39–39
+ MPackBundle import import MPackBundle L37–37
+ SnapshotRecord import import SnapshotRecord L39–39
+ annotations import import annotations L28–28
+ apply_mpack import import apply_mpack L37–37
+ compute_commit_id import import compute_commit_id L38–38
+ compute_snapshot_id import import compute_snapshot_id L38–38
+ datetime import import datetime L30–30
+ logging import import logging L31–31
+ msgpack import import msgpack L34–34
+ pathlib import import pathlib L32–32
+ pytest import import pytest L35–35
+ read_commit import import read_commit L39–39
+ write_commit import import write_commit L39–39
+ write_snapshot import import write_snapshot L39–39
~ tests/test_mpack_perf.py .py 29 symbols added
+ TestApplyMpackThroughput class class TestApplyMpackThroughput L200–216
+ test_clone_simulation_500_commits_under_3s method method test_clone_simulation_500_commits_under_3s L201–216
+ TestBuildMpackThroughput class class TestBuildMpackThroughput L127–153
+ test_100_commit_chain_build_under_2s method method test_100_commit_chain_build_under_2s L128–138
+ test_build_and_apply_1000_objects_under_3s method method test_build_and_apply_1000_objects_under_3s L140–153
+ TestCompressionSpeed class class TestCompressionSpeed L161–192
+ test_zstd_not_slower_than_2x_zlib method method test_zstd_not_slower_than_2x_zlib L162–180
+ test_zstd_ratio_on_source_code method method test_zstd_ratio_on_source_code L182–192
+ TestStreamThroughput class class TestStreamThroughput L78–119
+ test_1000_object_stream_under_2s method method test_1000_object_stream_under_2s L102–119
+ test_500_object_stream_under_1s method method test_500_object_stream_under_1s L79–100
+ _DT variable variable _DT L28–28
+ _init_repo function function _init_repo L35–43
+ _make_chain function function _make_chain L46–70
+ _sha function function _sha L31–32
+ CommitRecord import import CommitRecord L25–25
+ SnapshotRecord import import SnapshotRecord L25–25
+ annotations import import annotations L14–14
+ compute_commit_id import import compute_commit_id L24–24
+ compute_snapshot_id import import compute_snapshot_id L24–24
+ datetime import import datetime L16–16
+ hashlib import import hashlib L17–17
+ json import import json L18–18
+ pathlib import import pathlib L19–19
+ pytest import import pytest L22–22
+ time import import time L20–20
+ write_commit import import write_commit L25–25
+ write_object import import write_object L26–26
+ write_snapshot import import write_snapshot L25–25
~ tests/test_mpack_perf_ops.py .py 63 symbols added
+ TestApplyPackThroughput class class TestApplyPackThroughput L330–408
+ no_fsync method method no_fsync L341–346
+ test_apply_pack_10k_objects_under_60s method method test_apply_pack_10k_objects_under_60s L389–408
+ test_apply_pack_1k_objects_rate method method test_apply_pack_1k_objects_rate L349–368
+ test_apply_pack_idempotent_second_apply_skips_all method method test_apply_pack_idempotent_second_apply_skips_all L370–386
+ TestBuildPackThroughput class class TestBuildPackThroughput L153–256
+ test_build_pack_10k_objects_under_60s method method test_build_pack_10k_objects_under_60s L236–256
+ test_build_pack_1k_objects_rate method method test_build_pack_1k_objects_rate L164–181
+ test_build_pack_have_filter_excludes_base method method test_build_pack_have_filter_excludes_base L183–233
+ TestCollectObjectIdsThroughput class class TestCollectObjectIdsThroughput L259–322
+ test_collect_object_ids_faster_than_build_pack method method test_collect_object_ids_faster_than_build_pack L285–305
+ test_collect_object_ids_have_excludes_ancestors method method test_collect_object_ids_have_excludes_ancestors L307–322
+ test_collect_object_ids_no_blob_reads method method test_collect_object_ids_no_blob_reads L267–283
+ TestPackCapEnforcement class class TestPackCapEnforcement L545–690
+ test_apply_pack_accepts_bundle_at_exact_cap method method test_apply_pack_accepts_bundle_at_exact_cap L565–585
+ test_apply_pack_deduplicates_repeated_oid method method test_apply_pack_deduplicates_repeated_oid L642–662
+ test_apply_pack_empty_bundle_is_noop method method test_apply_pack_empty_bundle_is_noop L664–674
+ test_apply_pack_oversized_object_is_skipped_not_raised method method test_apply_pack_oversized_object_is_skipped_not_raised L603–640
+ test_apply_pack_rejects_bundle_exceeding_max_pack_objects method method test_apply_pack_rejects_bundle_exceeding_max_pack_objects L548–563
+ test_apply_pack_total_items_cap_is_cross_type method method test_apply_pack_total_items_cap_is_cross_type L587–601
+ test_have_equals_want_produces_empty_bundle method method test_have_equals_want_produces_empty_bundle L676–690
+ TestPackMemoryCeiling class class TestPackMemoryCeiling L698–751
+ test_apply_pack_peak_rss_under_64_mib_for_small_objects method method test_apply_pack_peak_rss_under_64_mib_for_small_objects L732–751
+ test_build_pack_peak_rss_proportional_to_blob_total method method test_build_pack_peak_rss_proportional_to_blob_total L707–730
+ TestPackRoundTrip class class TestPackRoundTrip L759–823
+ test_roundtrip_all_objects_restored method method test_roundtrip_all_objects_restored L762–806
+ test_roundtrip_msgpack_bundle_size_within_max_pack_bytes method method test_roundtrip_msgpack_bundle_size_within_max_pack_bytes L808–823
+ TestVerifyPackIntegrity class class TestVerifyPackIntegrity L416–537
+ test_verify_pack_10k_objects_under_120s method method test_verify_pack_10k_objects_under_120s L497–537
+ test_verify_pack_detects_hash_mismatch method method test_verify_pack_detects_hash_mismatch L452–494
+ test_verify_pack_stat_returns_counts method method test_verify_pack_stat_returns_counts L419–450
+ _fresh_repo function function _fresh_repo L81–88
+ _make_repo function function _make_repo L68–78
+ _populate function function _populate L91–145
+ _sha256 function function _sha256 L64–65
+ CommitRecord import import CommitRecord L50–50
+ MAX_OBJECT_WRITE_BYTES import import MAX_OBJECT_WRITE_BYTES L38–38
+ MAX_PACK_MSGPACK_BYTES import import MAX_PACK_MSGPACK_BYTES L50–50
+ MAX_PACK_OBJECTS import import MAX_PACK_OBJECTS L38–38
+ MPackBundle import import MPackBundle L38–38
+ Manifest import import Manifest L49–49
+ ObjectPayload import import ObjectPayload L38–38
+ SnapshotRecord import import SnapshotRecord L50–50
+ annotations import import annotations L23–23
+ apply_mpack import import apply_mpack L38–38
+ build_mpack import import build_mpack L38–38
+ collect_object_ids import import collect_object_ids L38–38
+ compute_commit_id import import compute_commit_id L47–47
+ compute_snapshot_id import import compute_snapshot_id L47–47
+ datetime import import datetime L25–25
+ hashlib import import hashlib L26–26
+ msgpack import import msgpack L33–33
+ patch import import patch L35–35
+ pathlib import import pathlib L27–27
+ pytest import import pytest L34–34
+ sys import import sys L28–28
+ tempfile import import tempfile L29–29
+ time import import time L30–30
+ tracemalloc import import tracemalloc L31–31
+ write_branch_ref import import write_branch_ref L50–50
+ write_commit import import write_commit L50–50
+ write_object import import write_object L37–37
+ write_snapshot import import write_snapshot L50–50
+ TestBuildPackExcludesCommitsWithMissingSnapshot class class TestBuildPackExcludesCommitsWithMissingSnapshot L178–270
+ test_no_warning_when_all_snapshots_present method method test_no_warning_when_all_snapshots_present L249–258
+ test_pack_bundle_snapshot_list_and_commit_list_are_consistent method method test_pack_bundle_snapshot_list_and_commit_list_are_consistent L226–247
+ test_pack_includes_commit_when_snapshot_present method method test_pack_includes_commit_when_snapshot_present L199–209
+ test_pack_raises_when_any_snapshot_missing_in_chain method method test_pack_raises_when_any_snapshot_missing_in_chain L211–224
+ test_pack_raises_when_snapshot_missing method method test_pack_raises_when_snapshot_missing L187–197
+ test_warning_emitted_when_snapshot_missing method method test_warning_emitted_when_snapshot_missing L260–270
+ TestMissingSnapshotRegressionInvariant class class TestMissingSnapshotRegressionInvariant L277–322
+ test_pack_aborts_on_chain_with_gaps method method test_pack_aborts_on_chain_with_gaps L282–298
+ test_reachable_commits_with_missing_snapshots_are_reported method method test_reachable_commits_with_missing_snapshots_are_reported L300–322
+ TestWalkCommitsMissingSnapshotDetection class class TestWalkCommitsMissingSnapshotDetection L113–171
+ test_walk_commits_detects_multiple_missing_snapshots_in_chain method method test_walk_commits_detects_multiple_missing_snapshots_in_chain L140–156
+ test_walk_commits_detects_single_missing_snapshot method method test_walk_commits_detects_single_missing_snapshot L126–138
+ test_walk_commits_missing_snapshots_not_in_have_are_excluded method method test_walk_commits_missing_snapshots_not_in_have_are_excluded L158–171
+ test_walk_commits_no_missing_snapshots_when_all_present method method test_walk_commits_no_missing_snapshots_when_all_present L116–124
+ _FileBytes variable variable _FileBytes L36–36
+ _REPO_ID variable variable _REPO_ID L50–50
+ _init_repo function function _init_repo L57–65
+ _make_commit function function _make_commit L68–106
+ _sha function function _sha L53–54
+ CommitRecord import import CommitRecord L39–39
+ MPackBundle import import MPackBundle L37–37
+ Manifest import import Manifest L33–33
+ SnapshotRecord import import SnapshotRecord L39–39
+ annotations import import annotations L25–25
+ build_mpack_from_walk import import build_mpack_from_walk L37–37
+ compute_commit_id import import compute_commit_id L38–38
+ compute_snapshot_id import import compute_snapshot_id L38–38
+ datetime import import datetime L27–27
+ hashlib import import hashlib L28–28
+ pathlib import import pathlib L29–29
+ pytest import import pytest L31–31
+ walk_commits import import walk_commits L37–37
+ write_commit import import write_commit L39–39
+ write_object import import write_object L34–34
+ write_snapshot import import write_snapshot L39–39
~ tests/test_mpack_stream.py .py 59 symbols added
+ TestReaderBasic class class TestReaderBasic L357–411
+ test_handles_partial_chunks method method test_handles_partial_chunks L367–379
+ test_multiple_frames_in_one_feed method method test_multiple_frames_in_one_feed L381–393
+ test_non_dict_frames_are_skipped method method test_non_dict_frames_are_skipped L405–411
+ test_returns_frame_dicts method method test_returns_frame_dicts L358–365
+ test_unknown_frame_types_are_yielded method method test_unknown_frame_types_are_yielded L395–403
+ TestReaderDecompressObject class class TestReaderDecompressObject L419–442
+ test_decompress_raw method method test_decompress_raw L429–435
+ test_decompress_zlib method method test_decompress_zlib L420–427
+ test_delta_raises_without_base method method test_delta_raises_without_base L437–442
+ TestRoundTrip class class TestRoundTrip L450–535
+ test_commit_pack_round_trip method method test_commit_pack_round_trip L483–492
+ test_end_frame_n_objects_matches_actual method method test_end_frame_n_objects_matches_actual L521–535
+ test_full_push_stream_round_trip method method test_full_push_stream_round_trip L494–519
+ test_header_round_trip method method test_header_round_trip L451–467
+ test_object_round_trip_zlib method method test_object_round_trip_zlib L469–481
+ TestStress class class TestStress L543–563
+ test_500_object_stream method method test_500_object_stream L544–563
+ TestWriterCommitPack class class TestWriterCommitPack L264–284
+ test_commits_and_snapshots_preserved method method test_commits_and_snapshots_preserved L274–284
+ test_t_field_is_C method method test_t_field_is_C L265–272
+ TestWriterEnd class class TestWriterEnd L292–304
+ test_n_objects_and_n_commits_echoed method method test_n_objects_and_n_commits_echoed L299–304
+ test_t_field_is_E method method test_t_field_is_E L293–297
+ TestWriterHeader class class TestWriterHeader L39–146
+ test_domains_field method method test_domains_field L96–106
+ test_have_list method method test_have_list L108–116
+ test_is_valid_msgpack method method test_is_valid_msgpack L46–53
+ test_objects_bytes_advisory method method test_objects_bytes_advisory L118–127
+ test_op_field method method test_op_field L73–81
+ test_provenance_agent_id method method test_provenance_agent_id L83–94
+ test_returns_bytes method method test_returns_bytes L40–44
+ test_signature_bytes_present method method test_signature_bytes_present L129–137
+ test_signer_key_empty_when_no_signing method method test_signer_key_empty_when_no_signing L139–146
+ test_t_field_is_H method method test_t_field_is_H L55–62
+ test_v_field_is_mpack_version method method test_v_field_is_mpack_version L64–71
+ TestWriterObjectRaw class class TestWriterObjectRaw L154–256
+ test_content_is_bytes method method test_content_is_bytes L238–246
+ test_content_is_smaller_than_raw_for_compressible_data method method test_content_is_smaller_than_raw_for_compressible_data L248–256
+ test_domain_field method method test_domain_field L216–224
+ test_enc_is_zlib_or_zstd method method test_enc_is_zlib_or_zstd L193–201
+ test_force_zlib method method test_force_zlib L203–214
+ test_id_field_is_sha256_prefixed method method test_id_field_is_sha256_prefixed L172–181
+ test_path_field method method test_path_field L226–236
+ test_returns_bytes method method test_returns_bytes L155–160
+ test_sz_equals_uncompressed_size method method test_sz_equals_uncompressed_size L183–191
+ test_t_field_is_O method method test_t_field_is_O L162–170
+ TestWriterResponseFrames class class TestWriterResponseFrames L312–349
+ test_write_ack_ready method method test_write_ack_ready L341–349
+ test_write_error_t_msg_code method method test_write_error_t_msg_code L321–327
+ test_write_progress_t_and_pct method method test_write_progress_t_and_pct L313–319
+ test_write_result_ok_true method method test_write_result_ok_true L329–339
+ _sha function function _sha L30–31
+ annotations import import annotations L20–20
+ hashlib import import hashlib L22–22
+ io import import io L23–23
+ msgpack import import msgpack L26–26
+ pytest import import pytest L27–27
+ zlib import import zlib L24–24
~ muse/cli/commands/bundle.py .py 3 symbols added, 3 symbols removed, 4 symbols modified
− PackBundle import import PackBundle L73–73
− apply_pack import import apply_pack L73–73
− build_pack import import build_pack L73–73
+ MPackBundle import import MPackBundle L73–73
+ apply_mpack import import apply_mpack L73–73
+ build_mpack import import build_mpack L73–73
~ muse/cli/commands/clone.py .py 1 symbol added, 1 symbol removed, 3 symbols modified
− apply_pack import import apply_pack L69–69
+ apply_mpack import import apply_mpack L69–69
~ run
~ muse/cli/commands/fetch.py .py 1 symbol added, 1 symbol removed, 2 symbols modified
− apply_pack import import apply_pack L81–81
+ apply_mpack import import apply_mpack L81–81
~ muse/cli/commands/pack_objects.py .py 1 symbol added, 1 symbol removed, 2 symbols modified
− build_pack import import build_pack L43–43
+ build_mpack import import build_mpack L43–43
~ run
~ muse/cli/commands/pull.py .py 1 symbol added, 1 symbol removed, 2 symbols modified
− apply_pack import import apply_pack L55–55
+ apply_mpack import import apply_mpack L55–55
~ run
~ muse/cli/commands/push.py .py 3 symbols added, 3 symbols removed, 7 symbols modified
− PackBundle import import PackBundle L88–88
− build_pack import import build_pack L88–88
− build_pack_from_walk import import build_pack_from_walk L88–88
+ MPackBundle import import MPackBundle L88–88
+ build_mpack import import build_mpack L88–88
+ build_mpack_from_walk import import build_mpack_from_walk L88–88
~ run
~ muse/cli/commands/unpack_objects.py .py 2 symbols added, 2 symbols removed, 2 symbols modified
− PackBundle import import PackBundle L37–37
− apply_pack import import apply_pack L37–37
+ MPackBundle import import MPackBundle L37–37
+ apply_mpack import import apply_mpack L37–37
~ run
~ muse/cli/commands/verify_pack.py .py 2 symbols modified
~ muse/core/compression.py .py 5 symbols added
+ choose_compression function function choose_compression L83–90
+ compress_and_encode function function compress_and_encode L93–108
+ compress_zstd function function compress_zstd L43–60
+ decompress_frame function function decompress_frame L111–140
+ decompress_zstd function function decompress_zstd L63–80
~ muse/core/pack.py .py 5 symbols added, 4 symbols removed, 6 symbols modified
− PackBundle class class PackBundle L98–111
− apply_pack function function apply_pack L591–733
− build_pack function function build_pack L416–526
− build_pack_from_walk function function build_pack_from_walk L317–393
+ MPackBundle class class MPackBundle L129–147
+ MPackSummary class class MPackSummary L107–126
+ apply_mpack function function apply_mpack L657–799
+ build_mpack function function build_mpack L468–592
+ build_mpack_from_walk function function build_mpack_from_walk L353–445
~ muse/core/transport.py .py 1 symbol added, 1 symbol removed, 17 symbols modified
~ tests/test_cli_clone.py .py 1 symbol added, 1 symbol removed, 4 symbols modified
− PackBundle import import PackBundle L16–16
+ MPackBundle import import MPackBundle L16–16
~ tests/test_cli_fetch_push.py .py 1 symbol added, 1 symbol removed, 6 symbols modified
− PackBundle import import PackBundle L21–21
+ MPackBundle import import MPackBundle L21–21
~ tests/test_cli_inspect.py .py 1 symbol added, 1 symbol removed, 3 symbols modified
− build_pack import import build_pack L24–24
+ build_mpack import import build_mpack L24–24
~ tests/test_core_transport.py .py 1 symbol added, 1 symbol removed, 4 symbols modified
− PackBundle import import PackBundle L19–19
+ MPackBundle import import MPackBundle L19–19

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