gabriel / musehub public
feat patch wire task/w16-snapshot-delta #1 / 1
AI Agent gabriel · 153 days ago · Apr 23, 2026 · Diff

feat(wire): server-side snapshot delta reconstruction

Wall 16: accept delta-encoded snapshots in C frames. - WireSnapshotDelta model in musehub.models.wire - reconstruct_snapshot_delta(delta, manifest_cache) -> WireSnapshot - C frame handler maintains _snap_manifest_cache across all frames - Processes snapshot_deltas alongside full snapshots in each C frame - restore iter_wire_frames_grpc (gRPC path needed for CF full-duplex) Tests: musehub/tests/test_wire_snapshot_delta.py (8)

sha256:fb8e6ae761f40efbdeba518e7532689c93ac877a85f1030faa39b98c07cd6a62 sha
+19 ~12 symbols
sha256:9077c90f85930b0f5fc9415dc2278e09bbb530a3e0f9bd21232b3cf74858a38d snapshot
+19
symbols added
~12
symbols modified
0
dead code introduced
Semantic Changes 31 symbols
~ tests/test_wire_snapshot_delta.py .py 15 symbols added
+ _make_manifest function function _make_manifest L28–29
+ _sha256_manifest function function _sha256_manifest L23–25
+ _snap_id function function _snap_id L32–33
+ annotations import import annotations L12–12
+ hashlib import import hashlib L14–14
+ msgpack import import msgpack L15–15
+ pytest import import pytest L16–16
+ test_delta_chain_reconstruction function function test_delta_chain_reconstruction L160–197
+ test_empty_delta_is_identity function function test_empty_delta_is_identity L204–223
+ test_reconstruct_snapshot_delta_add_only function function test_reconstruct_snapshot_delta_add_only L108–131
+ test_reconstruct_snapshot_delta_basic function function test_reconstruct_snapshot_delta_basic L78–105
+ test_reconstruct_snapshot_delta_missing_base_raises function function test_reconstruct_snapshot_delta_missing_base_raises L138–153
+ test_wire_snapshot_delta_invalid_base_id function function test_wire_snapshot_delta_invalid_base_id L64–71
+ test_wire_snapshot_delta_invalid_snapshot_id function function test_wire_snapshot_delta_invalid_snapshot_id L54–61
+ test_wire_snapshot_delta_valid function function test_wire_snapshot_delta_valid L40–51
~ musehub/models/wire.py .py 2 symbols added
+ WireSnapshotDelta class class WireSnapshotDelta L166–201
+ _check_id method method _check_id L196–201
~ musehub/services/musehub_wire.py .py 2 symbols added, 12 symbols modified
← Older Oldest on task/w16-snapshot-delta
All commits
Newer → Latest on task/w16-snapshot-delta

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