gabriel / musehub public
feat BREAKING storage task/phase1-per-repo-object-store #1 / 1
AI Agent gabriel · 48 days ago · May 1, 2026 · Diff

feat(storage): Phase 1 — per-repo object directory isolation

Each repo gets its own isolated object store under musehub_repos_dir: /data/repos/<owner>/<slug>/objects/sha256/<2-hex>/<62-hex>

LocalBackend._path/put/get/exists/delete/uri_for/stream/get_batch all accept optional repo_root: Path | None — backward compat when None (global store).

Path computation delegates to muse.core.object_store.object_path with objects_base=server_objects_dir(repo_root), giving the server the same algo-namespaced + 2-char sharded layout as the local client (.muse/objects/) without the .muse/ wrapper (bare repo). Phases 1 and 2 from issue #1 collapse into a single change — the sharding is free via the shared object_path.

repo_root_for(owner, slug) delegates to muse.core.paths.server_repo_root for path traversal validation and canonical layout. musehub_repos_dir added to Settings (default /data/repos).

44 new tests across 7 tiers in test_per_repo_object_store.py.

sha256:7c6330ae59ed5955168f7ca748e5faa3ab4800579073c31a764720bf620bb709 sha
sha256:5eba47d77d7bcd434d536b983a7fe3dfcbc5a56929d5cbe4f82d7168fee6bd07 snapshot
← Older Oldest on task/phase1-per-repo-object-store
All commits
Newer → Latest on task/phase1-per-repo-object-store

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