feat(mv): agent supercharge — TypedDicts, exit_code, duration_ms, JSON error routing
- Add _MvErrorJson TypedDict: status, error, exit_code - Extend _MvResultJson with duration_ms and exit_code fields - Add _emit_error(output_json, msg, code) — routes errors to stdout JSON in --json mode - Add t0/duration_ms timing to all JSON output paths (success, dry_run) - Add exit_code: 0 to all success JSON envelopes - Convert all 4 error paths in run() to use _emit_error - Update module docstring with full agent contract (exit_code, duration_ms, error schema) - Fix test_cmd_mv.py: _sha() now returns sha256:-prefixed IDs (unblocks 26 failures) - Add tests/test_mv_supercharge.py: 29 tests across 7 coverage tiers
sha256:89a186c86e72370d9bcea5c5e9d6161c9f109559babe71363ffd71b2c29692cf
sha
+67
~4
symbols
sha256:f57b04b672a6c4e07228c477291f014e8f463550bc13eb7981711d872e6cdbef
snapshot
+67
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes
71 symbols
+
test_staged_only_move_object_id_preserved
method
method test_staged_only_move_object_id_preserved L256–269
+
test_dest_already_tracked_error_goes_to_stdout
method
method test_dest_already_tracked_error_goes_to_stdout L173–180
+
test_dest_exists_on_disk_error_goes_to_stdout
method
method test_dest_exists_on_disk_error_goes_to_stdout L182–190
+
test_missing_disk_source_error_goes_to_stdout
method
method test_missing_disk_source_error_goes_to_stdout L163–171
+
test_path_traversal_error_goes_to_stderr_in_text_mode
method
method test_path_traversal_error_goes_to_stderr_in_text_mode L192–197
+
test_untracked_source_error_goes_to_stdout
method
method test_untracked_source_error_goes_to_stdout L153–161
+
test_error_payload_has_exit_code_nonzero
method
method test_error_payload_has_exit_code_nonzero L107–113
+
test_mv_error_json_has_required_fields
method
method test_mv_error_json_has_required_fields L322–326
+
test_mv_result_json_has_duration_ms_annotation
method
method test_mv_result_json_has_duration_ms_annotation L317–320
+
test_mv_result_json_has_exit_code_annotation
method
method test_mv_result_json_has_exit_code_annotation L312–315
~
run
~
_sha
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:89a186c86e72370d9bcea5c5e9d6161c9f109559babe71363ffd71b2c29692cf --body "your comment"
No comments yet. Be the first to start the discussion.