supercharge(merge-base): TypedDicts, exit_code, duration_ms, _emit_error; fix _resolve_ref sha256 bug
- Add _MergeBaseFoundJson, _MergeBaseNotFoundJson, _MergeBaseErrorJson TypedDicts - Add _emit_error(fmt, msg, code): routes errors to stdout as JSON in --json mode, suppresses duplicate stderr prose (fixes agent-breaking bug where all errors went to stderr even in --json mode) - Add t0 = time.monotonic() + duration_ms to both JSON output paths - Add exit_code to both JSON output paths (0 on success/not-found) - Fix _resolve_ref: wrap get_head_commit_id in try/except so sha256:-prefixed commit IDs no longer raise ValueError (validate_branch_name rejects colons) - Remove unused muse_dir variable from run() - Update module docstring: add duration_ms, exit_code, JSON error schema - Add test_merge_base_supercharge.py: 28 tests across envelope, errors, data integrity (symmetry, merge-commit input), TypedDicts, docstring, stress (100-commit) - Fix test_cmd_merge_base_and_snapshot_diff.py: update format_error_to_stderr assertion to match new prose message instead of JSON key name
0 comments
muse hub commit comment sha256:ae0d835c182bc1794181d62049a52cdd48270db6a83672011601eb25db9fb3a3 --body "your comment"
No comments yet. Be the first to start the discussion.