gabriel / muse public
fix patch dev
AI Agent gabriel · 122 days ago · May 9, 2026 · Diff

fix: streaming push never sends delta+zlib — only presign path may delta

Delta bases were chosen from server commit manifests with no storage confirmation. A ghost base (in DB, absent from MinIO) caused: ❌ Push failed: delta base sha256:… not found in storage

Fix: extract build_push_objects(already_stored=). Delta encoding only fires when the base oid is in already_stored — a storage-confirmed set from the presign response. Streaming path passes already_stored=set() so all objects go as full raw objects. No more ghost-base failures.

Tests D1–D4 pin the invariant.

sha256:4f6846d439b05714369d5727ece1c4c9e7031b8565b213565de923145848623e sha
+25 ~1 symbols
sha256:8e89371155086ad60a3090512faa3b0ac5bcc2c4665060776b306b3f6c471749 snapshot
+25
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 26 symbols
~ tests/test_push_no_streaming_delta.py .py 24 symbols added
+ _realistic function function _realistic L110–115
+ _repo function function _repo L57–67
+ _write_commit function function _write_commit L76–107
+ _write_obj function function _write_obj L70–73
+ CommitRecord import import CommitRecord L48–48
+ SnapshotRecord import import SnapshotRecord L48–48
+ __version__ import import __version__ L45–45
+ annotations import import annotations L36–36
+ blob_id import import blob_id L49–49
+ compute_commit_id import import compute_commit_id L47–47
+ compute_snapshot_id import import compute_snapshot_id L47–47
+ datetime import import datetime L38–38
+ inspect import import inspect L39–39
+ json import import json L40–40
+ muse_dir import import muse_dir L50–50
+ pathlib import import pathlib L41–41
+ pytest import import pytest L43–43
+ write_commit import import write_commit L48–48
+ write_object import import write_object L46–46
+ write_snapshot import import write_snapshot L48–48
+ test_d1_streaming_path_produces_no_delta_payloads function function test_d1_streaming_path_produces_no_delta_payloads L122–159
+ test_d2_successive_versions_sent_as_full_objects function function test_d2_successive_versions_sent_as_full_objects L166–198
+ test_d3_presign_path_may_use_delta_when_base_is_confirmed function function test_d3_presign_path_may_use_delta_when_base_is_confirmed L205–238
+ test_d4_structural_streaming_branch_no_delta function function test_d4_structural_streaming_branch_no_delta L245–262
~ muse/cli/commands/push.py .py 1 symbol added, 1 symbol modified
+ build_push_objects function function build_push_objects L138–224
← 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:4f6846d439b05714369d5727ece1c4c9e7031b8565b213565de923145848623e --body "your comment"