gabriel / muse public
fix patch dev
AI Agent gabriel · 155 days ago · Apr 20, 2026 · Diff

fix: algo-prefix glob fixes, branch list format, test suite cleanup

store.py — algo-prefixed glob fixes (already committed separately)

branch.py - Remove _BranchListJson envelope wrapper; muse branch --json returns a plain JSON array as specified (broken envelope caused TypeError across TestListJsonNewFields, TestResumableFilter, TestE2eRoundTrips)

snapshot_cmd.py - _list_all_snapshots: '*.msgpack' → '*/*.msgpack' (algo-prefix depth) - _resolve_snapshot: catch ValueError from read_snapshot on short IDs before falling through to prefix scan; prefix scan glob fixed to '*/{prefix}*.msgpack'

snapshot_diff.py - _resolve_snapshot_prefix: glob fixed to '*/{prefix}*.msgpack'

tests/test_algo_prefix_globs.py (new) - Regression suite covering all six algo-prefix glob functions: get_all_commits, _find_commit_by_prefix, find_commits_by_prefix, _list_all_snapshots, _resolve_snapshot, _resolve_snapshot_prefix, _resolve_to_snapshot_id — 20 tests

tests/test_cli_inspect.py - Add --json to rev-parse and update-ref tests that parse JSON output - Remove --format text anti-pattern (text is default) - Add --json to unpack-objects tests that parse JSON output

tests/test_cli_log.py / test_cli_workflow.py - Replace -n with --limit (-n is reserved for --dry-run ecosystem-wide)

tests/test_cli_stream_push.py - Fix mock: get_refs → fetch_remote_info (transport method was renamed)

sha256:5a43a2f02c8a3652b769870b0784701af2b3f208730854ee14ab905e857f59b5 sha
+46 ~27 symbols
sha256:48ddc19fccfc98fbb8c340d71677789186da3f736c5f2e7eec4a22378fdd563f snapshot
+46
symbols added
~27
symbols modified
0
dead code introduced
Semantic Changes 73 symbols
~ tests/test_algo_prefix_globs.py .py 46 symbols added
+ TestCommitPrefixScan class class TestCommitPrefixScan L147–174
+ test_find_by_bare_hex_prefix method method test_find_by_bare_hex_prefix L148–156
+ test_find_commits_by_prefix_no_match_returns_empty method method test_find_commits_by_prefix_no_match_returns_empty L170–174
+ test_find_commits_by_prefix_returns_list method method test_find_commits_by_prefix_returns_list L158–164
+ test_no_match_returns_none method method test_no_match_returns_none L166–168
+ TestGetAllCommits class class TestGetAllCommits L112–139
+ test_empty_repo_returns_empty_list method method test_empty_repo_returns_empty_list L133–135
+ test_missing_commits_dir_returns_empty_list method method test_missing_commits_dir_returns_empty_list L137–139
+ test_returns_all_written_commits method method test_returns_all_written_commits L121–131
+ test_returns_written_commit method method test_returns_written_commit L113–119
+ TestGetAllSnapshots class class TestGetAllSnapshots L182–207
+ test_empty_repo_returns_empty_list method method test_empty_repo_returns_empty_list L203–207
+ test_returns_all_written_snapshots method method test_returns_all_written_snapshots L192–201
+ test_returns_written_snapshot method method test_returns_written_snapshot L183–190
+ TestResolveDiffSnapshotPrefix class class TestResolveDiffSnapshotPrefix L264–290
+ test_bare_hex_rejected method method test_bare_hex_rejected L275–282
+ test_short_prefixed_id_resolves method method test_short_prefixed_id_resolves L265–273
+ test_unknown_prefix_returns_none method method test_unknown_prefix_returns_none L284–290
+ TestResolveSnapshotFullId class class TestResolveSnapshotFullId L215–231
+ test_full_prefixed_id_resolves method method test_full_prefixed_id_resolves L216–223
+ test_unknown_id_returns_none method method test_unknown_id_returns_none L225–231
+ TestResolveSnapshotShortPrefix class class TestResolveSnapshotShortPrefix L239–256
+ test_short_prefixed_id_resolves method method test_short_prefixed_id_resolves L240–248
+ test_unrecognized_prefix_returns_none method method test_unrecognized_prefix_returns_none L250–256
+ TestResolveToSnapshotId class class TestResolveToSnapshotId L298–316
+ test_full_snapshot_id_resolves method method test_full_snapshot_id_resolves L310–316
+ test_short_prefixed_snapshot_id_resolves method method test_short_prefixed_snapshot_id_resolves L299–308
+ _NOW variable variable _NOW L55–55
+ _REPO_ID variable variable _REPO_ID L54–54
+ _init_repo function function _init_repo L58–65
+ _make_commit function function _make_commit L82–104
+ _make_snapshot function function _make_snapshot L68–79
+ CommitRecord import import CommitRecord L40–40
+ SnapshotRecord import import SnapshotRecord L40–40
+ _find_commit_by_prefix import import _find_commit_by_prefix L48–48
+ annotations import import annotations L30–30
+ compute_snapshot_id import import compute_snapshot_id L39–39
+ datetime import import datetime L32–32
+ find_commits_by_prefix import import find_commits_by_prefix L40–40
+ get_all_commits import import get_all_commits L40–40
+ json import import json L33–33
+ pathlib import import pathlib L34–34
+ pytest import import pytest L36–36
+ short_id import import short_id L38–38
+ write_commit import import write_commit L40–40
+ write_snapshot import import write_snapshot L40–40
~ muse/cli/commands/branch.py .py 1 symbol modified
~ run
~ tests/test_cli_log.py .py 2 symbols 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:5a43a2f02c8a3652b769870b0784701af2b3f208730854ee14ab905e857f59b5 --body "your comment"