gabriel / muse public
feat patch show task/supercharge-show #1 / 1
AI Agent gabriel · 58 days ago · Apr 18, 2026 · Diff

feat(show): add elapsed_ms/exit_code JSON envelope, fix double-print error bug

- Add import time + start_time/_elapsed() closure in run() - Add _emit_error() closure: emits structured JSON to stdout (--json) or plain text to stderr (text mode) — consistent with rev-list, rev-parse, shortlog pattern - Fix double-print bug: commit-not-found with --json no longer also prints plain-text ❌ to stderr; _emit_error() handles both paths in one place - Inject elapsed_ms + exit_code into all JSON success payloads - Update module docstring with full JSON schema and error envelope - Add tests/test_cmd_show_hardening.py: 16 tests covering elapsed_ms/exit_code on success, structured error JSON on stdout, no duplicate stderr, envelope fields on --no-delta/--manifest/--no-stat paths - Fix test_format_flag_produces_same_as_json_flag: exclude elapsed_ms from equality comparison (timing differs between separate invocations)

sha256:3c688506f4d9cac48a6a2eb9589c1ec5da6879d4bcdd3442e64d3a0a39091f5b sha
sha256:531d19e228b4451b96cbfbbeac86867a4e21b252f391cbfd62d35ae31755b218 snapshot
← Older Oldest on task/supercharge-show
All commits
Newer → Latest on task/supercharge-show

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