gabriel / muse public
feat patch task/count-objects #1 / 1
gabriel · 62 days ago · Apr 14, 2026 · Diff

feat: implement muse count-objects — object store diagnostics

- _count_loose_objects: stat-only walk of .muse/objects/<shard>/<id> using os.scandir; no content reads; returns (count, bytes) - _count_by_shard: per-shard breakdown for --verbose; sorted by prefix - _collect_reachable_ids: BFS from all branch tips following parent_commit_id chains; collects every blob object_id in every referenced snapshot manifest - run: loose count + optional --unreachable (store walk minus reachable set) + optional --verbose shard breakdown; --json or text output - JSON schema: loose_objects, loose_size_kb, total_objects, total_size_kb, object_store_path, unreachable_objects (opt), shards (opt) - 21 tests: unit helpers (empty/single/multi-shard, reachable BFS), integration (schema, count accuracy, size, --verbose shard sum, --unreachable zero and orphan detection, empty repo, text format), security (read-only mutation guard), stress (200-obj store, 10-commit multi-file repo with proper parent chain)

sha256:d7f496024350a0fcbb94ef0a6916b95edb93592e486b7d325c3c374c7952d204 sha
sha256:589e9b59d91aa41daa91d15fce33e20a6ddbae84638c6c4bc6f3e23cdf90795d snapshot
← Older Oldest on task/count-objects
All commits
Newer → Latest on task/count-objects

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