gabriel / muse public
feat BREAKING MWP-5 task/mwp-5-clone-retry-503 #6 / 11
AI Agent gabriel · 23 days ago · Jun 29, 2026 · Diff

feat(MWP-5): bounded 503 retry loop in fetch_mpack with Retry-After honor

Phase 3–5 implementation: - Extract HttpTransport._fetch_mpack_once from fetch_mpack (single-attempt body) - Add retry loop in HttpTransport.fetch_mpack: honors Retry-After, tracks total_waited against retry_budget_s, prints progress to stderr - Add --retry-timeout / --no-retry flags to clone, fetch, pull - Improve terminal 503 message in all three commands (retryable JSON marker) - Tests MWP5_07–MWP5_18 all green (19 total, zero regressions)

sha256:1df101e06206778511bc1b961d78270ac494c2986bfdf12104bb1d7d8a0474b2 sha
+45 ~12 symbols
sha256:9108e304f848697fddb8038d8678e17cbcee558baf15c1c7cb3f1ffabdcb1f4b snapshot
+45
symbols added
~12
symbols modified
0
dead code introduced
Semantic Changes 57 symbols
~ docs/issues/version-tags-followup.md .md 15 symbols added
+ Version tags: deferred items from issue #56 section Version tags: deferred items from issue #56 L1–89
+ Acceptance criteria section Acceptance criteria L85–89
+ Background section Background L6–12
+ Deferred items section Deferred items L12–85
+ MuseHub GUI display of version tags section 1. MuseHub GUI display of version tags L14–23
+ muse release integration section 2. muse release integration L23–37
+ code variable variable code L32–36
+ muse tag sign — cryptographic signing of version tags section 3. muse tag sign — cryptographic signing of version tags L37–56
+ code variable variable code L44–48
+ code[python] variable variable code[python] L51–55
+ Tag listing on the remote without fetching section 4. Tag listing on the remote without fetching L56–68
+ code variable variable code L61–65
+ 0-rc14~3) section 5. Relative version resolution (v0.2.0-rc14~3) L68–78
+ code variable variable code L72–77
+ Non-SemVer version strings section 6. Non-SemVer version strings L78–85
~ muse/cli/commands/clone.py .py 3 symbols modified
~ muse/cli/commands/pull.py .py 2 symbols modified
~ muse/core/transport.py .py 1 symbol added, 2 symbols modified
+ _fetch_mpack_once method method _fetch_mpack_once L924–1042
~ tests/test_mwp5_clone_retry.py .py 29 symbols added, 1 symbol modified
+ TestMWP5Phase3 class class TestMWP5Phase3 L331–503
+ test_mwp5_07_single_503_then_success method method test_mwp5_07_single_503_then_success L334–359
+ test_mwp5_08_two_503s_then_success method method test_mwp5_08_two_503s_then_success L361–394
+ test_mwp5_09_503_no_retry_after_uses_default_backoff method method test_mwp5_09_503_no_retry_after_uses_default_backoff L396–419
+ test_mwp5_10_budget_exhausted_raises_503 method method test_mwp5_10_budget_exhausted_raises_503 L421–452
+ test_mwp5_11_non_503_raises_immediately method method test_mwp5_11_non_503_raises_immediately L454–476
+ test_mwp5_12_retry_budget_zero_is_single_attempt method method test_mwp5_12_retry_budget_zero_is_single_attempt L478–503
+ TestMWP5Phase4 class class TestMWP5Phase4 L589–797
+ test_mwp5_13_clone_503_then_success method method test_mwp5_13_clone_503_then_success L592–620
+ test_mwp5_14_clone_503_forever_budget_zero_removes_dir method method test_mwp5_14_clone_503_forever_budget_zero_removes_dir L625–672
+ test_mwp5_15_fetch_503_then_success method method test_mwp5_15_fetch_503_then_success L674–703
+ test_mwp5_16_pull_503_then_success method method test_mwp5_16_pull_503_then_success L706–746
+ test_mwp5_17_json_clone_retry_chatter_on_stderr_only method method test_mwp5_17_json_clone_retry_chatter_on_stderr_only L749–797
+ TestMWP5Phase5 class class TestMWP5Phase5 L805–880
+ test_mwp5_18_real_urllib_503_then_success method method test_mwp5_18_real_urllib_503_then_success L808–880
+ _APPLY_RESULT variable variable _APPLY_RESULT L543–549
+ _COMMIT_ID variable variable _COMMIT_ID L518–518
+ _FETCH_RESULT variable variable _FETCH_RESULT L531–541
+ _REMOTE_INFO variable variable _REMOTE_INFO L522–529
+ _REPO_ID variable variable _REPO_ID L520–520
+ _SNAP_ID variable variable _SNAP_ID L519–519
+ _clone_patches function function _clone_patches L573–586
+ _seq_transport function function _seq_transport L552–570
+ MagicMock import import MagicMock L513–513
+ argparse import import argparse L510–510
+ contextlib import import contextlib L511–511
+ fake_id import import fake_id L515–515
+ patch import import patch L513–513
+ pathlib import import pathlib L512–512

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:1df101e06206778511bc1b961d78270ac494c2986bfdf12104bb1d7d8a0474b2 --body "your comment"