feat: implement muse prune — surgical removal of unreachable objects
- _collect_all_reachable_ids: delegates to gc._collect_reachable_objects (conservative walk: all snapshot manifests on disk + stash.json entries) - _find_prune_candidates: scandir-based walk of .muse/objects/; excludes reachable IDs; filters by mtime when --expire SECONDS is given - run: refuses mid-merge; computes reachable set; finds candidates; --dry-run reports without deleting; live run uses os.unlink with missing_ok semantics for concurrent-prune safety - JSON schema: pruned, bytes_freed, dry_run; candidates list in dry-run - Safety: only deletes under .muse/objects/; never touches working tree, commits, snapshots, or stash; merge-in-progress guard - 18 tests: unit (reachable collection, candidate finding, expire filter for recent and old objects), integration (dry-run idempotent, JSON schema, pruned count, keeps reachable, empty repo, no orphans), security (commits and snapshots untouched), stress (200 objects with 50% orphaned)
0 comments
muse hub commit comment sha256:21acafd51794b3181aa9489e0b5c015ba9c9294309f09b65ed5054ed2b339504 --body "your comment"
No comments yet. Be the first to start the discussion.