gabriel / musehub public
feat BREAKING wire task/delta-snapshot-wire #1 / 1
AI Agent gabriel · 125 days ago · May 11, 2026 · Diff

feat(wire): delta snapshot format + manifest_blob nullable + bundle hash proof

Content-addressing is a proof, not a label.

- Make MusehubSnapshot.manifest_blob nullable (migration 0053) snapshot_id = sha256(manifest) — the ID is the proof; no need to store the manifest - wire_push_unpack_bundle: verify sha256(wire_bytes) == bundle_key once, then reconstruct manifests from delta chain without per-snapshot re-hashing - Store manifest_blob=None during bundle push — bundle in MinIO is source of truth - Same delta reconstruction applied to wire_push_unpack (streaming push path) - Add test_wire_step4c_scale.py: 1000 commits × 1000 snapshots × 5000 objects < 10s

Result: unpack-bundle for 1000 commits × 5000 objects: 1337ms (was 9694ms, 7× faster)

sha256:a338df95efa8c1b082e4a6a3cc61c67d35c03d6f0e869646bab8f1466853292d sha
+47 ~3 symbols
sha256:dbe0aa173360d40863fc36faac5e521dd921f9390bc77b2386818fd91b25995f snapshot
+47
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 50 symbols
+ branch_labels variable variable branch_labels L18–18
+ depends_on variable variable depends_on L19–19
+ down_revision variable variable down_revision L17–17
+ downgrade function function downgrade L31–40
+ annotations import import annotations L10–10
+ op import import op L13–13
+ sa import import sa L12–12
+ revision variable variable revision L16–16
+ upgrade function function upgrade L22–28
~ tests/test_wire_step4c_scale.py .py 38 symbols added
+ _AUTH_CTX variable variable _AUTH_CTX L57–62
+ _BLOB_SIZE variable variable _BLOB_SIZE L49–49
+ _E2E_GATE_S variable variable _E2E_GATE_S L50–50
+ _N_COMMITS variable variable _N_COMMITS L47–47
+ _N_OBJECTS variable variable _N_OBJECTS L48–48
+ _make_repo function function _make_repo L101–111
+ _populate function function _populate L114–184
+ client function async_function client L66–80
+ ASGITransport import import ASGITransport L22–22
+ AsyncClient import import AsyncClient L22–22
+ AsyncSession import import AsyncSession L23–23
+ CommitRecord import import CommitRecord L33–33
+ MSignContext import import MSignContext L25–25
+ SnapshotRecord import import SnapshotRecord L33–33
+ annotations import import annotations L11–11
+ app import import app L27–27
+ blob_id import import blob_id L40–40
+ build_mpack import import build_mpack L30–30
+ compute_commit_id import import compute_commit_id L32–32
+ compute_snapshot_id import import compute_snapshot_id L32–32
+ datetime import import datetime L13–13
+ get_db import import get_db L26–26
+ hashlib import import hashlib L14–14
+ httpx import import httpx L18–18
+ msgpack import import msgpack L19–19
+ muse_dir import import muse_dir L31–31
+ optional_signed_request import import optional_signed_request L25–25
+ pathlib import import pathlib L15–15
+ pytest import import pytest L20–20
+ pytest_asyncio import import pytest_asyncio L21–21
+ require_signed_request import import require_signed_request L25–25
+ time import import time L16–16
+ write_branch_ref import import write_branch_ref L33–33
+ write_commit import import write_commit L33–33
+ write_object import import write_object L29–29
+ write_snapshot import import write_snapshot L33–33
+ repo function async_function repo L84–94
+ test_scale_unpack_bundle function async_function test_scale_unpack_bundle L192–279
~ musehub/db/musehub_models.py .py 1 symbol modified
← Older Oldest on task/delta-snapshot-wire
All commits
Newer → Latest on task/delta-snapshot-wire

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