gabriel / musehub public
refactor BREAKING task/sweep-pack-to-mpack #2 / 2
AI Agent gabriel · 124 days ago · May 16, 2026 · Diff

refactor: delete musehub/storage/pack.py and tiers.py — dead server-side code

pack.py and tiers.py implemented local disk object packing (.pack/.idx files) for a server that stores everything in MinIO. auto_pack() was never called in production — only in tests. These concerns belong in muse/core/mpack.py, not on the server side.

sha256:5e65aa1aaed553d3e4294192cb4cb2e35b68298d9c90a12c83c2d6675c9fb360 sha
−99 symbols
sha256:fe230576ce8951f213f03b85608f38a0de8579b7e7275c7d2c0825cacfd41f71 snapshot
−99
symbols removed
0
dead code introduced
Semantic Changes 99 symbols
~ musehub/storage/pack.py .py 13 symbols removed
GCPackResult class class GCPackResult L33–34
PackResult class class PackResult L28–30
_loose_objects function function _loose_objects L39–53
_pack_dir function function _pack_dir L36–37
_pack_hash function function _pack_hash L55–59
gc_packs function function gc_packs L116–148
Path import import Path L21–21
dataclass class import dataclass L20–20
hashlib import import hashlib L19–19
long_id import import long_id L25–25
msgpack import import msgpack L23–23
pack_loose_objects function function pack_loose_objects L61–99
read_packed_object function function read_packed_object L101–114
~ musehub/storage/tiers.py .py 16 symbols removed
AutoPackResult class class AutoPackResult L47–49
PruneResult class class PruneResult L34–35
StorageStats class class StorageStats L38–44
total method method total L43–44
StorageTier class class StorageTier L29–31
_loose_object_ids function function _loose_object_ids L53–65
_loose_path function function _loose_path L67–70
_packed_object_ids function function _packed_object_ids L72–81
auto_pack function function auto_pack L128–143
classify_object class function classify_object L105–115
Path import import Path L25–25
dataclass class import dataclass L24–24
enum import import enum L23–23
long_id import import long_id L27–27
prune_packed function function prune_packed L85–103
storage_stats function function storage_stats L117–126
~ tests/test_pack_files.py .py 31 symbols removed
TestGCPacks class class TestGCPacks L223–277
test_gc_keeps_pack_with_unique_objects method method test_gc_keeps_pack_with_unique_objects L246–266
test_gc_noop_with_single_pack method method test_gc_noop_with_single_pack L268–277
test_gc_removes_pack_superseded_by_newer_pack method method test_gc_removes_pack_superseded_by_newer_pack L224–244
TestPackCreatesFiles class class TestPackCreatesFiles L60–110
test_creates_pack_and_index_files method method test_creates_pack_and_index_files L73–87
test_creates_pack_dir method method test_creates_pack_dir L61–71
test_noop_when_no_loose_objects method method test_noop_when_no_loose_objects L89–96
test_packs_all_loose_objects method method test_packs_all_loose_objects L98–110
TestPackIdempotent class class TestPackIdempotent L184–218
test_packing_already_packed_objects_skips_them method method test_packing_already_packed_objects_skips_them L204–218
test_same_objects_produce_same_pack_name method method test_same_objects_produce_same_pack_name L185–202
TestPackResult class class TestPackResult L282–305
test_bytes_packed_sums_object_sizes method method test_bytes_packed_sums_object_sizes L295–305
test_packed_count_matches_loose_objects method method test_packed_count_matches_loose_objects L283–293
TestReadPackedObject class class TestReadPackedObject L115–179
test_reads_all_objects_from_pack method method test_reads_all_objects_from_pack L139–153
test_reads_from_correct_pack_when_multiple_exist method method test_reads_from_correct_pack_when_multiple_exist L155–179
test_reads_object_from_pack method method test_reads_object_from_pack L116–126
test_returns_none_for_unknown_object method method test_returns_none_for_unknown_object L128–137
_count_loose function function _count_loose L46–51
_oid function function _oid L23–26
_pack_dir function function _pack_dir L54–55
_repo_root function function _repo_root L29–33
_write_loose function function _write_loose L36–43
Path import import Path L13–13
annotations import import annotations L10–10
blob_id import import blob_id L18–18
msgpack import import msgpack L16–16
pytest import import pytest L15–15
secrets import import secrets L12–12
~ tests/test_storage_tiers.py .py 39 symbols removed
TestAutoPack class class TestAutoPack L359–410
test_exact_threshold_triggers method method test_exact_threshold_triggers L400–410
test_packs_and_prunes_when_loose_meets_threshold method method test_packs_and_prunes_when_loose_meets_threshold L360–375
test_skips_when_loose_below_threshold method method test_skips_when_loose_below_threshold L377–389
test_skips_when_no_loose_objects method method test_skips_when_no_loose_objects L391–398
TestClassifyObject class class TestClassifyObject L190–238
test_hot_before_prune_loose_and_pack_both_present method method test_hot_before_prune_loose_and_pack_both_present L214–225
test_hot_for_loose_object method method test_hot_for_loose_object L191–199
test_warm_for_object_in_pack_loose_removed method method test_warm_for_object_in_pack_loose_ L227–238
test_warm_for_packed_object_after_prune method method test_warm_for_packed_object_after_prune L201–212
TestClassifyObjectUnknown class class TestClassifyObjectUnknown L243–272
test_returns_none_after_object_deleted_from_all_tiers method method test_returns_none_after_object_deleted_from_all_tiers L257–272
test_returns_none_for_missing_object method method test_returns_none_for_missing_object L244–248
test_returns_none_in_empty_repo method method test_returns_none_in_empty_repo L250–255
TestPrunePacked class class TestPrunePacked L66–127
test_noop_when_no_loose_exists method method test_noop_when_no_loose_exists L115–127
test_noop_when_no_packs_exist method method test_noop_when_no_packs_exist L102–113
test_removes_all_covered_loose_objects method method test_removes_all_covered_loose_objects L84–100
test_removes_loose_after_packing method method test_removes_loose_after_packing L67–82
TestPrunePackedPreservesUnpacked class class TestPrunePackedPreservesUnpacked L132–185
test_mixed_prune_removes_only_covered method method test_mixed_prune_removes_only_covered L156–185
test_preserves_loose_objects_not_in_any_pack method method test_preserves_loose_objects_not_in_any_pack L133–154
TestStorageStats class class TestStorageStats L277–354
test_all_loose_before_packing method method test_all_loose_before_packing L278–288
test_empty_repo_all_zeros method method test_empty_repo_all_zeros L329–335
test_mixed_hot_and_warm method method test_mixed_hot_and_warm L306–327
test_total_equals_hot_plus_warm method method test_total_equals_hot_plus_warm L337–354
test_warm_count_after_pack_and_prune method method test_warm_count_after_pack_and_prune L290–304
_count_loose function function _count_loose L52–57
_loose_path function function _loose_path L46–49
_oid function function _oid L24–27
_pack_dir function function _pack_dir L60–61
_repo_root function function _repo_root L30–34
_write_loose function function _write_loose L37–43
Path import import Path L15–15
annotations import import annotations L12–12
blob_id import import blob_id L19–19
pytest import import pytest L17–17
secrets import import secrets L14–14

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