gabriel / musehub public
feat patch pack-index dev
AI Agent gabriel · 122 days ago · May 15, 2026 · Diff

feat(pack-index): Phase 1 — MusehubPackIndex model, migration, and process_bundle_index_job writes

- Add MusehubPackIndex ORM model to musehub_repo_models.py PK (object_id, pack_id), FK repo_id → musehub_repos, index (repo_id, object_id) - Add alembic migration 0059_pack_index.py (down_revision=0058) - Import MusehubPackIndex in musehub_wire.py - process_bundle_index_job now bulk-inserts pack index rows after object refs, on_conflict_do_nothing for idempotency; pack_index_ms added to timing log and return dict - Add TDD tests PI-1..4 (test_pack_index_phase1.py) — all 4 green

Issue #63 Phase 1 complete.

sha256:2105146d055a4446cb4982a8ef4ba02446bf2f3cf0a1890ce338b7dad67d6e65 sha
+29 ~13 symbols
sha256:a207206f2875c70fbce7a36cf5c0f40732ae539a00b920a633594a0f2d4b89ec snapshot
+29
symbols added
~13
symbols modified
0
dead code introduced
Semantic Changes 42 symbols
~ alembic/versions/0059_pack_index.py .py 9 symbols added
+ branch_labels variable variable branch_labels L15–15
+ depends_on variable variable depends_on L16–16
+ down_revision variable variable down_revision L14–14
+ downgrade function function downgrade L45–47
+ annotations import import annotations L8–8
+ op import import op L11–11
+ sa import import sa L10–10
+ revision variable variable revision L13–13
+ upgrade function function upgrade L19–42
~ tests/test_pack_index_phase1.py .py 18 symbols added
+ _enqueue_and_process function async_function _enqueue_and_process L53–85
+ _make_bundle function function _make_bundle L30–43
+ _store_bundle function async_function _store_bundle L46–50
+ AsyncSession import import AsyncSession L18–18
+ annotations import import annotations L10–10
+ blob_id import import blob_id L20–20
+ compute_identity_id import import compute_identity_id L22–22
+ create_repo import import create_repo L23–23
+ datetime import import datetime L12–12
+ db import import db L21–21
+ hashlib import import hashlib L13–13
+ msgpack import import msgpack L15–15
+ pytest import import pytest L16–16
+ select import import select L17–17
+ test_pi1_pack_index_written_for_every_object function async_function test_pi1_pack_index_written_for_every_object L93–118
+ test_pi2_pack_id_matches_bundle_key function async_function test_pi2_pack_id_matches_bundle_key L126–144
+ test_pi3_second_push_adds_rows_without_overwriting function async_function test_pi3_second_push_adds_rows_without_overwriting L152–183
+ test_pi4_queryable_by_repo_id function async_function test_pi4_queryable_by_repo_id L191–232
~ musehub/db/musehub_repo_models.py .py 1 symbol added
+ MusehubPackIndex class class MusehubPackIndex L648–674
← 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:2105146d055a4446cb4982a8ef4ba02446bf2f3cf0a1890ce338b7dad67d6e65 --body "your comment"