feat(gc): phase 3 — prune object refs and globally unreferenced objects
Extended GCResult with object_refs_deleted, objects_deleted, storage_bytes_freed. GC now walks orphaned snapshot manifests to identify stale ref rows, deletes them, then finds objects with zero remaining refs globally and removes them from both musehub_objects and storage. Shared objects (refs from other repos) are preserved.
Added 6-test suite in tests/test_gc_object_refs.py covering: - stale ref deletion after force push - ref retention when object is still in a live snapshot - global object deletion when no refs remain - shared object retention when another repo holds a ref - clean-repo no-op invariant - GCResult field accuracy
sha256:6aa4ede3e0fe46a9ddef4c41015bed0195ef2a8f904417a772f293f9a7fc3bb2
sha
+31
~2
symbols
sha256:7fb36d48044faa193e8696eb5560803e3b96162e9e6e572a3221e3493e33cf00
snapshot
+31
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
33 symbols
+
test_gc_clean_repo_does_not_touch_refs
function
async_function test_gc_clean_repo_does_not_touch_refs L308–333
+
test_gc_deletes_globally_orphaned_object
function
async_function test_gc_deletes_globally_orphaned_object L233–258
+
test_gc_keeps_object_when_other_repo_holds_ref
function
async_function test_gc_keeps_object_when_other_repo_holds_ref L266–300
+
test_gc_keeps_ref_for_live_object
function
async_function test_gc_keeps_ref_for_live_object L199–225
+
test_gc_removes_stale_ref_for_orphaned_object
function
async_function test_gc_removes_stale_ref_for_orphaned_object L161–191
← Older
Oldest on task/phase3-gc-object-refs
All commits
Newer →
Latest on task/phase3-gc-object-refs
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:6aa4ede3e0fe46a9ddef4c41015bed0195ef2a8f904417a772f293f9a7fc3bb2 --body "your comment"
No comments yet. Be the first to start the discussion.