gabriel / muse public
feat BREAKING fetch task/fetch-phase2-tdd #1 / 2
AI Agent gabriel · 121 days ago · May 16, 2026 · Diff

feat(fetch): objects through apply_mpack — remove on_object callback

Phase 2 has no per-object streaming: one GET, one blob, one sha256 check. The on_object callback was a relic of the old multi-URL paths.

- FetchMPackResult gains objects: list[dict] field; transport.fetch_mpack collects all objects from the mpack and returns them in the result - on_object param removed from fetch_mpack entirely - fetch.py, clone.py, pull.py: pass {commits, snapshots, objects} to apply_mpack; remove direct write_object calls and _on_object callbacks - ApplyResult gains failed_objects: list[str] and skipped_snapshots: list[str]; apply_mpack exposes the already-tracked sets in the return value - fetch.py and pull.py gate set_remote_head on failed_objects being empty - clone.py gates branch ref advancement on the apply_result - test_transport_fetch_mpack.py deleted (tested the old presign-flag and inline-bytes paths that no longer exist) - test_cmd_fetch_hardening.py updated: write_object patches removed, _make_apply_result and _make_fetch_mpack_result aligned to new shapes - FM-6 rewritten: verifies objects appear in result, not via callback

sha256:6c1eec0a32db12cc7b3e64e54918be8ee5bce3deed7a0e021bef94b50951db31 sha
+1 ~22 −34 symbols
sha256:b02090c95163a4da30b9ee8293ed70b6c3920af27b3a7a7c10410c68ceaede37 snapshot
+1
symbol added
~22
symbols modified
−34
symbols removed
0
dead code introduced
Semantic Changes 57 symbols
~ tests/test_transport_fetch_mpack.py .py 26 symbols removed
_Resp class class _Resp L92–95
__init__ method method __init__ L93–95
_URL variable variable _URL L31–31
_inline_response function function _inline_response L68–77
_make_mpack function function _make_mpack L34–65
_mock_client function function _mock_client L98–105
_presign_response function function _presign_response L80–89
FetchMPackResult import import FetchMPackResult L25–25
HttpTransport import import HttpTransport L25–25
MagicMock import import MagicMock L19–19
ObjectPayload import import ObjectPayload L24–24
TransportError import import TransportError L25–25
annotations import import annotations L16–16
blob_id import import blob_id L26–26
fake_id import import fake_id L26–26
hashlib import import hashlib L18–18
msgpack import import msgpack L21–21
patch import import patch L19–19
pytest import import pytest L22–22
test_fb0_inline_mpack_returns_fetch_result function function test_fb0_inline_mpack_returns_fetch_result L112–126
test_fb1_inline_sha256_mismatch_raises function function test_fb1_inline_sha256_mismatch_raises L133–146
test_fb2_presigned_url_mpack_returns_fetch_result function function test_fb2_presigned_url_mpack_returns_fetch_result L153–168
test_fb3_presigned_sha256_mismatch_raises function function test_fb3_presigned_sha256_mismatch_raises L175–189
test_fb4_on_object_called_for_each_mpack_object function function test_fb4_on_object_called_for_each_mpack_object L196–218
test_fb5_post_non_200_raises function function test_fb5_post_non_200_raises L225–233
test_fb6_presigned_get_non_200_raises function function test_fb6_presigned_get_non_200_raises L240–253
~ muse/cli/commands/clone.py .py 2 symbols removed, 2 symbols modified
ObjectPayload import import ObjectPayload L69–69
write_object import import write_object L68–68
~ run
~ muse/cli/commands/fetch.py .py 2 symbols removed, 2 symbols modified
ObjectPayload import import ObjectPayload L81–81
write_object import import write_object L80–80
~ muse/cli/commands/pull.py .py 2 symbols removed, 2 symbols modified
ObjectPayload import import ObjectPayload L54–54
write_object import import write_object L52–52
~ run
~ muse/core/mpack.py .py 2 symbols modified
~ tests/test_transport_fetch_phase2.py .py 1 symbol added, 1 symbol removed
test_fm6_on_object_callback_called_for_each_object function function test_fm6_on_object_callback_called_for_each_object L187–205
+ test_fm6_all_objects_present_in_result function function test_fm6_all_objects_present_in_result L187–202

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