gabriel / musehub public
feat BREAKING phase5 task/phase5-drop-object-repo-id #1 / 1
gabriel · 68 days ago · Apr 13, 2026 · Diff

feat(phase5): drop musehub_objects.repo_id — replace with object_refs JOIN

Migration 0045 removes the legacy repo_id owner column from musehub_objects. Per-repo reachability is now exclusively tracked via musehub_object_refs (composite PK: repo_id, object_id), enabling content-addressed dedup across repos — two repos pushing identical bytes share one row, each gets its own ref.

Changes: - alembic/versions/0045: drops repo_id column, FK, and two indices; downgrade restores them as nullable - musehub_wire.py: remove repo_id from all MusehubObject bulk inserts (5 sites) - musehub_models.py: add MusehubSnapshotEntry ORM model (table dropped in 0043, re-introduced for TDD snapshot entry tests) - object_integrity.py: soft_delete / reap / scan operate on objects table only - orphan_scan.py, repository_service.py, sync.py, ui_view.py: update queries to JOIN object_refs instead of filtering on repo_id - deploy/decompress_objects.py, repair_objects.py: remove repo_id references - tests: remove repo_id= from all MusehubObject() constructors; add ref rows where missing; update migration count assertions to 45; fix object_store tests to match new LocalBackend._write repair semantics; add releases dir fixture so /releases/* tests don't fail in envs without /data/releases

sha256:6b76f58affa66ef710e49b882cf808fc6cd75418e246ebb3c44ec0fae2ef50ea sha
sha256:3b785888fa141e55149aa4ee0b155e58786b47a36cb98121ed99af7644706662 snapshot
← Older Oldest on task/phase5-drop-object-repo-id
All commits
Newer → Latest on task/phase5-drop-object-repo-id

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