gabriel / musehub public
fix patch wire dev
AI Agent gabriel · 120 days ago · May 15, 2026 · Diff

fix(wire): rename delta frame key base_id → base; fix repo_id in test helpers

Server was emitting {"base_id": base_oid} in delta O frames but the client reads frame.get("base", ""). The mismatch caused apply_delta(b"", delta) to produce garbage — sha256(garbage) != object_id → Content integrity failure.

Fix: renamed server-side key from base_id to base in wire_fetch_stream.

Also removed repo_id from MusehubCommit and MusehubSnapshot instantiation in test helpers after those columns were dropped from the globally content-addressed models. Added test_wire_fetch_stream_frame_integrity.py (FI-1 full frame baseline, FI-2 delta frame integrity) that was RED before this fix.

sha256:b4fb9db2858c35127b2dee273737d049c228a6f6d13ff8d671ad1c6dec5d5cae sha
+29 ~5 symbols
sha256:f058b9dbb16bf1c2313fd8f15ee8dabfbaca0445dccee7f99323a87610c56642 snapshot
+29
symbols added
~5
symbols modified
0
dead code introduced
Semantic Changes 34 symbols
+ TestDeltaFrameIntegrity class class TestDeltaFrameIntegrity L222–291
+ test_fi2_delta_frame_sha256_matches_object_id method async_method test_fi2_delta_frame_sha256_matches_object_id L224–291
+ TestFullFrameIntegrity class class TestFullFrameIntegrity L154–190
+ test_fi1_full_frame_sha256_matches_object_id method async_method test_fi1_full_frame_sha256_matches_object_id L156–190
+ _client_decode function function _client_decode L63–93
+ _collect_frames function async_function _collect_frames L53–60
+ _make_commit_with_manifest function async_function _make_commit_with_manifest L122–149
+ _now function function _now L49–50
+ _realistic_source function function _realistic_source L195–219
+ _store_object function async_function _store_object L96–119
+ Any import import Any L29–29
+ AsyncSession import import AsyncSession L34–34
+ MusehubCommit import import MusehubCommit L37–37
+ MusehubObject import import MusehubObject L37–37
+ MusehubObjectRef import import MusehubObjectRef L37–37
+ MusehubSnapshot import import MusehubSnapshot L37–37
+ SFRAME_OBJECT import import SFRAME_OBJECT L43–43
+ WireFetchRequest import import WireFetchRequest L43–43
+ annotations import import annotations L24–24
+ blob_id import import blob_id L36–36
+ create_repo import import create_repo L44–44
+ datetime import import datetime L28–28
+ fake_id import import fake_id L36–36
+ hashlib import import hashlib L26–26
+ msgpack import import msgpack L31–31
+ pg_insert import import pg_insert L33–33
+ pytest import import pytest L32–32
+ timezone import import timezone L28–28
+ zlib import import zlib L27–27
← 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:b4fb9db2858c35127b2dee273737d049c228a6f6d13ff8d671ad1c6dec5d5cae --body "your comment"