gabriel / muse public
feat patch task/supercharge-checkout #1 / 1
AI Agent gabriel · 152 days ago · Apr 17, 2026 · Diff

feat: supercharge muse checkout for agent use

- Fix resolve_commit_ref to strip sha256: prefix before filesystem glob so partial SHAs like '6c688abc' resolve correctly - Fix text output to show bare hex (e.g. 'HEAD is now at 6c688abc') instead of 'sha256:6c' which was the previous broken slice - Add elapsed_seconds and exit_code to all 12 JSON output paths: created, switched, already_on, detached, restored, dry-run variants, conflict_resolved, conflict_resolved_all - Update module and run() docstrings with complete JSON contract - Fix test slices: sha[:12] -> sha.removeprefix('sha256:')[:12] - Add 35 new tests: TestElapsed (11), TestExitCode (10), TestJsonSchemaComplete (4), plus detach partial-SHA regression coverage

sha256:e2fd1fb18451626dc59cc3f6044dc49417a984e1c59b31b3e1508fb4d6966f6c sha
+28 ~6 symbols
sha256:be0f6ab44c94b8536560511e4e053a22e3941150c4fe08d20c37ced06f660533 snapshot
+28
symbols added
~6
symbols modified
0
dead code introduced
Semantic Changes 34 symbols
~ muse/cli/commands/checkout.py .py 1 symbol added, 1 symbol modified
+ time import import time L68–68
~ run
~ muse/core/store.py .py 1 symbol modified
~ tests/test_cmd_checkout.py .py 27 symbols added, 4 symbols modified
+ TestElapsed class class TestElapsed L1198–1280
+ test_already_on_json_has_elapsed method method test_already_on_json_has_elapsed L1213–1217
+ test_conflict_resolved_all_json_has_elapsed method method test_conflict_resolved_all_json_has_elapsed L1249–1263
+ test_conflict_resolved_single_json_has_elapsed method method test_conflict_resolved_single_json_has_elapsed L1265–1280
+ test_create_json_has_elapsed method method test_create_json_has_elapsed L1207–1211
+ test_detach_json_has_elapsed method method test_detach_json_has_elapsed L1219–1225
+ test_dry_run_create_json_has_elapsed method method test_dry_run_create_json_has_elapsed L1232–1235
+ test_dry_run_detach_json_has_elapsed method method test_dry_run_detach_json_has_elapsed L1237–1242
+ test_dry_run_switch_json_has_elapsed method method test_dry_run_switch_json_has_elapsed L1227–1230
+ test_restored_json_has_elapsed method method test_restored_json_has_elapsed L1244–1247
+ test_switch_json_has_elapsed method method test_switch_json_has_elapsed L1201–1205
+ TestExitCode class class TestExitCode L1283–1361
+ test_already_on_json_exit_code_0 method method test_already_on_json_exit_code_0 L1296–1299
+ test_conflict_resolved_all_json_exit_code_0 method method test_conflict_resolved_all_json_exit_code_0 L1330–1344
+ test_conflict_resolved_single_json_exit_code_0 method method test_conflict_resolved_single_json_exit_code_0 L1346–1361
+ test_create_json_exit_code_0 method method test_create_json_exit_code_0 L1291–1294
+ test_detach_json_exit_code_0 method method test_detach_json_exit_code_0 L1301–1306
+ test_dry_run_create_json_exit_code_0 method method test_dry_run_create_json_exit_code_0 L1313–1316
+ test_dry_run_detach_json_exit_code_0 method method test_dry_run_detach_json_exit_code_0 L1318–1323
+ test_dry_run_switch_json_exit_code_0 method method test_dry_run_switch_json_exit_code_0 L1308–1311
+ test_restored_json_exit_code_0 method method test_restored_json_exit_code_0 L1325–1328
+ test_switch_json_exit_code_0 method method test_switch_json_exit_code_0 L1286–1289
+ TestJsonSchemaComplete class class TestJsonSchemaComplete L1364–1396
+ test_already_on_has_complete_schema method method test_already_on_has_complete_schema L1392–1396
+ test_create_has_complete_schema method method test_create_has_complete_schema L1378–1382
+ test_detach_has_complete_schema method method test_detach_has_complete_schema L1384–1390
+ test_switch_has_complete_schema method method test_switch_has_complete_schema L1372–1376
← Older Oldest on task/supercharge-checkout
All commits
Newer → Latest on task/supercharge-checkout

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