gabriel / muse public
fix patch dev
AI Agent gabriel · 112 days ago · May 19, 2026 · Diff

fix: force-resign silent no-op and push false up-to-date on missing repo

migrate --force-resign returned commits_signed=0 when the repo had no hub configured because get_signing_identity() needs a hub URL. Fixed by: - migrate() now raises ValueError when force_resign=True but no identity - migrate CLI falls back to remote URLs when no hub section is configured

push to a non-existent repo (404) silently returned status=up_to_date by swallowing the TransportError and falling back to stale local tracking refs. Fixed by letting _fetch_remote_info_safe re-raise HTTP errors (404, 401, 5xx) and catching them early in run() with git-style fatal error messages.

sha256:53a490b35d3e01926a7d0ff0acd526407eb2cefa1778d7819c5ac5417ff2450d sha
+80 ~4 symbols
sha256:8ebd8833336ab7b99ef35b20c50ab27303c210522a1597021e45c588de58f391 snapshot
+80
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 84 symbols
~ tests/test_migrate_force_resign.py .py 42 symbols added
+ _AT variable variable _AT L48–48
+ _AT_ISO variable variable _AT_ISO L49–49
+ _build_stale_signed_chain function function _build_stale_signed_chain L161–205
+ _init_repo function function _init_repo L64–73
+ _make_identity function function _make_identity L60–61
+ _make_key function function _make_key L56–57
+ _pub_str function function _pub_str L99–101
+ _read_raw_commit function function _read_raw_commit L155–158
+ _set_ref function function _set_ref L149–152
+ _sign_over_id function function _sign_over_id L89–96
+ _write_commit_raw function function _write_commit_raw L104–146
+ _write_snap function function _write_snap L76–86
+ Ed25519PrivateKey import import Ed25519PrivateKey L28–28
+ SigningIdentity import import SigningIdentity L40–40
+ annotations import import annotations L20–20
+ b64url_encode import import b64url_encode L41–41
+ blob_id import import blob_id L41–41
+ commits_dir import import commits_dir L31–31
+ compute_commit_id import import compute_commit_id L39–39
+ compute_snapshot_id import import compute_snapshot_id L39–39
+ datetime import import datetime L22–22
+ decode_pubkey import import decode_pubkey L38–38
+ encode_public_key import import encode_public_key L32–32
+ json import import json L23–23
+ long_id import import long_id L41–41
+ migrate import import migrate L30–30
+ msgpack import import msgpack L26–26
+ muse_dir import import muse_dir L31–31
+ pathlib import import pathlib L24–24
+ provenance_payload import import provenance_payload L32–32
+ pytest import import pytest L27–27
+ ref_path import import ref_path L31–31
+ sign_commit_ed25519 import import sign_commit_ed25519 L32–32
+ snapshots_dir import import snapshots_dir L31–31
+ split_id import import split_id L41–41
+ verify_commit_ed25519 import import verify_commit_ed25519 L32–32
+ test_fr1_force_resign_returns_commits_signed function function test_fr1_force_resign_returns_commits_signed L212–228
+ test_fr2_commits_verify_after_force_resign function function test_fr2_commits_verify_after_force_resign L235–275
+ test_fr3_no_resign_without_flag function function test_fr3_no_resign_without_flag L282–294
+ test_fr4_force_resign_idempotent function function test_fr4_force_resign_idempotent L301–319
+ test_fr5_force_resign_covers_stale_signed_commits function function test_fr5_force_resign_covers_stale_signed_commits L349–364
+ test_fr6_force_resign_without_identity_raises function function test_fr6_force_resign_without_identity_raises L330–346
~ tests/test_push_repo_not_found.py .py 38 symbols added
+ _bare_repo function function _bare_repo L58–69
+ _make_commit function function _make_commit L72–96
+ _run_push function function _run_push L125–164
+ _run_push_json function function _run_push_json L167–207
+ _transport_401 function function _transport_401 L116–122
+ _transport_404 function function _transport_404 L99–106
+ _transport_network_down function function _transport_network_down L109–113
+ cli variable variable cli L51–51
+ CliRunner import import CliRunner L47–47
+ CommitRecord import import CommitRecord L44–44
+ MagicMock import import MagicMock L35–35
+ Manifest import import Manifest L46–46
+ RemoteInfo import import RemoteInfo L40–40
+ SnapshotRecord import import SnapshotRecord L44–44
+ TransportError import import TransportError L45–45
+ __version__ import import __version__ L39–39
+ annotations import import annotations L29–29
+ argparse import import argparse L31–31
+ blob_id import import blob_id L46–46
+ compute_commit_id import import compute_commit_id L43–43
+ compute_snapshot_id import import compute_snapshot_id L43–43
+ datetime import import datetime L32–32
+ heads_dir import import heads_dir L42–42
+ json import import json L33–33
+ muse_dir import import muse_dir L42–42
+ patch import import patch L35–35
+ pathlib import import pathlib L34–34
+ pytest import import pytest L37–37
+ remotes_dir import import remotes_dir L42–42
+ write_commit import import write_commit L44–44
+ write_object import import write_object L41–41
+ write_snapshot import import write_snapshot L44–44
+ runner variable variable runner L50–50
+ test_p404_1_repo_not_found_exits_nonzero function function test_p404_1_repo_not_found_exits_nonzero L214–235
+ test_p404_2_repo_not_found_json_error function function test_p404_2_repo_not_found_json_error L242–262
+ test_p404_3_network_error_uses_cached_refs function function test_p404_3_network_error_uses_cached_refs L269–291
+ test_p404_4_auth_error_exits_nonzero function function test_p404_4_auth_error_exits_nonzero L298–316
+ test_p404_5_fetch_remote_info_safe_reraises_on_404 function function test_p404_5_fetch_remote_info_safe_reraises_on_404 L323–340
~ muse/cli/commands/migrate.py .py 1 symbol modified
~ run
~ muse/core/migrate.py .py 1 symbol modified
← Older Oldest on dev
All commits
Newer → Latest on dev

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:53a490b35d3e01926a7d0ff0acd526407eb2cefa1778d7819c5ac5417ff2450d --body "your comment"