gabriel / muse public
feat BREAKING feat/shallow-clone #1 / 1
AI Agent gabriel · 140 days ago · Apr 29, 2026 · Diff

feat: muse clone --depth N (shallow clone)

- FetchStreamResult gains shallow_commits: list[str] - Transport.fetch_stream gains depth: int | None = None param - HttpTransport includes depth in msgpack request body; parses shallow_commits from H frame - LocalTransport accepts depth param (no-op; always full history) - muse clone --depth N flag: validates >= 1, rejects 0 with user-friendly error - Writes .muse/shallow with boundary commit IDs when depth active - JSON output includes shallow_commits field - 9 TDD tests: flag registration, transport forwarding, shallow file, JSON output

sha256:9707812d8270d7fbb592700cc054f220d7daa0c7e5487fb193b4b99afa463f88 sha
+28 ~10 symbols
sha256:1307b05d362ffa8bc8ee8a24afbac433bf7153278135543b2c9d1eb0356dc951 snapshot
+28
symbols added
~10
symbols modified
0
dead code introduced
Semantic Changes 38 symbols
~ tests/test_clone_shallow.py .py 28 symbols added
+ TestDepthFlagRegistered class class TestDepthFlagRegistered L78–92
+ test_depth_defaults_to_none method method test_depth_defaults_to_none L84–87
+ test_depth_flag_exists method method test_depth_flag_exists L79–82
+ test_depth_shortflag method method test_depth_shortflag L89–92
+ TestDepthForwardedToTransport class class TestDepthForwardedToTransport L99–153
+ test_depth_1_passed_to_fetch_stream method method test_depth_1_passed_to_fetch_stream L100–127
+ test_no_depth_passes_none_to_fetch_stream method method test_no_depth_passes_none_to_fetch_stream L129–153
+ TestInvalidDepth class class TestInvalidDepth L227–238
+ test_depth_zero_rejected method method test_depth_zero_rejected L228–238
+ TestNoShallowFileOnFullClone class class TestNoShallowFileOnFullClone L196–220
+ test_no_shallow_file_on_full_clone method method test_no_shallow_file_on_full_clone L197–220
+ TestShallowFileWritten class class TestShallowFileWritten L160–189
+ test_shallow_file_written_on_depth_clone method method test_shallow_file_written_on_depth_clone L161–189
+ TestShallowJsonOutput class class TestShallowJsonOutput L245–277
+ test_json_includes_shallow_commits method method test_json_includes_shallow_commits L246–277
+ _clone_parser function function _clone_parser L37–41
+ _fake_fetch_result function function _fake_fetch_result L44–61
+ _fake_remote_info function function _fake_remote_info L64–71
+ _make_parser function function _make_parser L29–34
+ MagicMock import import MagicMock L18–18
+ annotations import import annotations L13–13
+ argparse import import argparse L15–15
+ call import import call L18–18
+ json import import json L16–16
+ patch import import patch L18–18
+ pathlib import import pathlib L17–17
+ pytest import import pytest L20–20
+ register import import register L22–22
~ muse/cli/commands/clone.py .py 3 symbols modified
← Older Oldest on feat/shallow-clone
All commits
Newer → Latest on feat/shallow-clone

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