gabriel / muse public
feat BREAKING task/clone-partial-exit-code #1 / 1
AI Agent gabriel · 126 days ago · May 9, 2026 · Diff

feat: add PARTIAL exit code (6) for clone with corrupt objects

- ExitCode.PARTIAL (6) added to muse/core/errors.py — documents the completed-with-skips contract distinct from INTERNAL_ERROR (3) - clone: count skipped objects in _on_object; raise SystemExit(PARTIAL) when any are skipped - _restore_working_tree: catch RuntimeError from apply_manifest when objects are missing (partial clone leaves some objects unwritten) - _CloneJson: add skipped_objects field to JSON envelope - tests/test_clone_partial.py: TDD — 3 tests covering exit code, object write correctness, and JSON skipped_objects count

sha256:0c3b9e5389ee64657abd3917d383b9b717ebe4bda029fa1e993a603c3f8f22c6 sha
+23 ~4 symbols
sha256:91680d67d25d4e4dfffe67c25f343d50a8dbf71884adf057d0decc2bddd70542 snapshot
+23
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 27 symbols
~ tests/test_clone_partial.py .py 23 symbols added
+ TestClonePartial class class TestClonePartial L133–184
+ test_exit_code_is_partial_when_objects_skipped method method test_exit_code_is_partial_when_objects_skipped L134–146
+ test_good_object_is_written_despite_corrupt_sibling method method test_good_object_is_written_despite_corrupt_sibling L148–166
+ test_json_envelope_includes_skipped_objects_count method method test_json_envelope_includes_skipped_objects_count L168–184
+ _make_bundle_with_corrupt_object function function _make_bundle_with_corrupt_object L40–101
+ _make_remote_info function function _make_remote_info L31–37
+ _mock_transport function function _mock_transport L104–130
+ cli variable variable cli L28–28
+ CliRunner import import CliRunner L25–25
+ ExitCode import import ExitCode L21–21
+ MPackBundle import import MPackBundle L22–22
+ ObjectPayload import import ObjectPayload L22–22
+ RemoteInfo import import RemoteInfo L22–22
+ annotations import import annotations L13–13
+ blob_id import import blob_id L24–24
+ compute_commit_id import import compute_commit_id L23–23
+ compute_snapshot_id import import compute_snapshot_id L23–23
+ json import import json L15–15
+ long_id import import long_id L24–24
+ pathlib import import pathlib L16–16
+ pytest import import pytest L19–19
+ mock import import unittest.mock L17–17
+ runner variable variable runner L27–27
~ muse/core/errors.py .py 1 symbol modified
← Older Oldest on task/clone-partial-exit-code
All commits
Newer → Latest on task/clone-partial-exit-code

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