gabriel / musehub public
feat BREAKING feat/wire-clone-scale #1 / 1
AI Agent gabriel · 145 days ago · Apr 29, 2026 · Diff

feat: shallow fetch — depth-limited BFS in wire_fetch_stream

- WireFetchRequest gains depth: int | None = None (ge=1) - wire_fetch_stream caps BFS at depth hops; boundary commits returned as shallow_commits - H frame includes shallow_commits list (empty when depth=None) - 12 TDD tests cover schema, full history, depth=1/2, H frame, objects, DAG

sha256:6dd0ace38e24f244bb289d3c495367d610b8a2cf8cbec11f9e449430b6cb8313 sha
+44 ~2 symbols
sha256:fa364ed34f28772d55d04d30e1f0943d2c48410fada3fa529b1ef64ab064c8da snapshot
+44
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 46 symbols
~ tests/test_wire_shallow_fetch.py .py 44 symbols added
+ TestDepthOnSingleCommit class class TestDepthOnSingleCommit L332–354
+ test_single_commit_depth_1_equals_full method async_method test_single_commit_depth_1_equals_full L334–354
+ TestDepthOne class class TestDepthOne L191–224
+ test_depth_1_returns_only_tip method async_method test_depth_1_returns_only_tip L193–209
+ test_depth_1_stream_ends_cleanly method async_method test_depth_1_stream_ends_cleanly L212–224
+ TestDepthTwo class class TestDepthTwo L231–251
+ test_depth_2_includes_parent_excludes_grandparent method async_method test_depth_2_includes_parent_excludes_grandparent L233–251
+ TestFullHistory class class TestFullHistory L166–184
+ test_no_depth_returns_all_commits method async_method test_no_depth_returns_all_commits L168–184
+ TestShallowDAG class class TestShallowDAG L361–385
+ test_depth_1_on_merge_commit_returns_only_merge method async_method test_depth_1_on_merge_commit_returns_only_merge L363–385
+ TestShallowHeader class class TestShallowHeader L258–291
+ test_h_frame_has_shallow_commits_on_depth method async_method test_h_frame_has_shallow_commits_on_depth L260–275
+ test_h_frame_no_shallow_commits_without_depth method async_method test_h_frame_no_shallow_commits_without_depth L278–291
+ TestShallowObjects class class TestShallowObjects L298–325
+ test_depth_1_only_sends_tip_objects method async_method test_depth_1_only_sends_tip_objects L300–325
+ TestWireFetchRequestSchema class class TestWireFetchRequestSchema L148–159
+ test_depth_accepts_none_explicitly method method test_depth_accepts_none_explicitly L157–159
+ test_depth_accepts_positive_int method method test_depth_accepts_positive_int L153–155
+ test_depth_defaults_to_none method method test_depth_defaults_to_none L149–151
+ _collect_frames function async_function _collect_frames L129–134
+ _make_commit function async_function _make_commit L67–88
+ _make_object function async_function _make_object L91–126
+ _make_snapshot function async_function _make_snapshot L48–64
+ _now function function _now L44–45
+ _uid function function _uid L40–41
+ _unpack_chunks function function _unpack_chunks L137–141
+ AsyncSession import import AsyncSession L22–22
+ SFRAME_COMMIT_PACK import import SFRAME_COMMIT_PACK L26–26
+ SFRAME_END import import SFRAME_END L26–26
+ SFRAME_HEADER import import SFRAME_HEADER L26–26
+ SFRAME_OBJECT import import SFRAME_OBJECT L26–26
+ WireFetchRequest import import WireFetchRequest L26–26
+ annotations import import annotations L14–14
+ asyncio import import asyncio L16–16
+ blob_id import import blob_id L24–24
+ create_repo import import create_repo L33–33
+ datetime import import datetime L18–18
+ db import import db L25–25
+ fake_id import import fake_id L24–24
+ msgpack import import msgpack L20–20
+ pytest import import pytest L21–21
+ timezone import import timezone L18–18
+ zlib import import zlib L17–17
~ musehub/models/wire.py .py 1 symbol modified
← Older Oldest on feat/wire-clone-scale
All commits
Newer → Latest on feat/wire-clone-scale

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