gabriel / musehub public
feat BREAKING mpack-index dev
AI Agent gabriel · 120 days ago · May 16, 2026 · Diff

feat(mpack-index): extend MusehubMPackIndex to cover commits and snapshots

Renamed MusehubPackIndex → MusehubMPackIndex (alias kept for in-flight callers). Schema changes (migration 0063): object_id → entity_id pack_id → mpack_id +entity_type VARCHAR(16) — 'object', 'commit', or 'snapshot'

process_mpack_index_job now writes index rows for all three entity types in one atomic batch. Fetch and GC queries updated to filter by entity_type='object' so they remain correct against the broader index.

Also fixes WIRE_CONTENT_TYPE import (moved from muse.core.mpack → muse.core.mwp during the rename sweep; musehub/api/routes/wire.py had the stale import).

TDD: tests/test_mpack_index_phase2.py covers PI-5 through PI-8.

sha256:f181d75c143fa6c0bae9455c0391fa8819530d51542b108ce6cb9086bb0115f5 sha
+34 ~21 symbols
sha256:ab8aec78152e7306611dcd766b8fb3e8690bb0455ab1c343d79de05011a0d822 snapshot
+34
symbols added
~21
symbols modified
0
dead code introduced
Semantic Changes 55 symbols
+ branch_labels variable variable branch_labels L21–21
+ depends_on variable variable depends_on L22–22
+ down_revision variable variable down_revision L20–20
+ downgrade function function downgrade L49–61
+ annotations import import annotations L14–14
+ op import import op L17–17
+ sa import import sa L16–16
+ revision variable variable revision L19–19
+ upgrade function function upgrade L25–46
~ tests/test_mpack_index_phase2.py .py 23 symbols added
+ _DT variable variable _DT L38–38
+ _enqueue_and_process function async_function _enqueue_and_process L121–152
+ _make_commit_dict function function _make_commit_dict L41–75
+ _make_full_mpack function function _make_full_mpack L89–112
+ _make_snapshot_dict function function _make_snapshot_dict L78–86
+ _store_mpack function async_function _store_mpack L115–118
+ AsyncSession import import AsyncSession L25–25
+ annotations import import annotations L17–17
+ blob_id import import blob_id L28–28
+ compute_commit_id import import compute_commit_id L27–27
+ compute_identity_id import import compute_identity_id L29–29
+ compute_snapshot_id import import compute_snapshot_id L27–27
+ create_repo import import create_repo L31–31
+ datetime import import datetime L19–19
+ db import import db L30–30
+ hashlib import import hashlib L20–20
+ msgpack import import msgpack L22–22
+ pytest import import pytest L23–23
+ select import import select L24–24
+ test_pi5_commit_ids_indexed_after_push function async_function test_pi5_commit_ids_indexed_after_push L160–189
+ test_pi6_snapshot_ids_indexed_after_push function async_function test_pi6_snapshot_ids_indexed_after_push L197–226
+ test_pi7_all_three_types_indexed_atomically function async_function test_pi7_all_three_types_indexed_atomically L234–277
+ test_pi8_second_push_indexes_without_overwriting function async_function test_pi8_second_push_indexes_without_overwriting L285–326
~ musehub/api/routes/wire.py .py 1 symbol modified
~ musehub/db/musehub_repo_models.py .py 1 symbol added, 1 symbol modified
+ MusehubMPackIndex class class MusehubMPackIndex L649–671
← Older Oldest on dev
All commits
Newer → Latest on dev

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