gabriel / muse public
feat patch dev
AI Agent gabriel · 161 days ago · Apr 19, 2026 · Diff

feat: supercharge muse code impact — -j alias, exit_code, duration_ms

- Add -j alias for --json - Add exit_code=0 and duration_ms to both reverse and forward JSON paths - Add exit_code: int and duration_ms: float to _ImpactJson TypedDict - Expand run() docstring with JSON envelope section - Thread duration_ms through _render_forward and _render_reverse helpers - Add test_impact_supercharge.py — 38 tests (first impact tests ever)

sha256:f9c3a92662a7678834c5544ecc449451a06976b602c42816b262290d8303d086 sha
+56 ~5 symbols
sha256:912888d018792db869fd9f2313b72d4e7704d89ce3e7d695f38d2baad0cf39d1 snapshot
+56
symbols added
~5
symbols modified
0
dead code introduced
Semantic Changes 61 symbols
~ tests/test_impact_supercharge.py .py 55 symbols added
+ TestAnsiSanitization class class TestAnsiSanitization L278–291
+ test_forward_mode_no_ansi method method test_forward_mode_no_ansi L289–291
+ test_j_alias_output_no_ansi method method test_j_alias_output_no_ansi L285–287
+ test_json_output_no_ansi method method test_json_output_no_ansi L281–283
+ TestDocstrings class class TestDocstrings L259–270
+ test_run_docstring_mentions_duration_ms method method test_run_docstring_mentions_duration_ms L267–270
+ test_run_docstring_mentions_exit_code method method test_run_docstring_mentions_exit_code L262–265
+ TestDurationMs class class TestDurationMs L147–174
+ test_duration_ms_under_2000ms method method test_duration_ms_under_2000ms L172–174
+ test_forward_mode_duration_ms_present method method test_forward_mode_duration_ms_present L166–170
+ test_j_alias_duration_ms_present method method test_j_alias_duration_ms_present L162–164
+ test_json_duration_ms_is_float method method test_json_duration_ms_is_float L158–160
+ test_json_duration_ms_nonnegative method method test_json_duration_ms_nonnegative L154–156
+ test_json_has_duration_ms method method test_json_has_duration_ms L150–152
+ TestExitCode class class TestExitCode L182–215
+ test_exit_code_leaf_symbol method method test_exit_code_leaf_symbol L211–215
+ test_exit_code_mirrors_process_exit method method test_exit_code_mirrors_process_exit L202–204
+ test_forward_mode_exit_code_zero method method test_forward_mode_exit_code_zero L206–209
+ test_j_alias_exit_code_present method method test_j_alias_exit_code_present L198–200
+ test_json_exit_code_is_int method method test_json_exit_code_is_int L194–196
+ test_json_exit_code_zero method method test_json_exit_code_zero L189–192
+ test_json_has_exit_code method method test_json_has_exit_code L185–187
+ TestForwardMode class class TestForwardMode L299–320
+ test_forward_and_json_not_reverse method method test_forward_and_json_not_reverse L317–320
+ test_forward_has_callees_key method method test_forward_has_callees_key L302–305
+ test_forward_has_total_key method method test_forward_has_total_key L311–315
+ test_forward_mode_field_is_forward method method test_forward_mode_field_is_forward L307–309
+ TestJsonAlias class class TestJsonAlias L95–139
+ test_j_alias_address_echoed method method test_j_alias_address_echoed L127–129
+ test_j_alias_exits_zero method method test_j_alias_exits_zero L98–100
+ test_j_alias_forward_mode method method test_j_alias_forward_mode L131–135
+ test_j_alias_has_blast_radius_key method method test_j_alias_has_blast_radius_key L106–108
+ test_j_alias_has_mode_key method method test_j_alias_has_mode_key L110–112
+ test_j_alias_mode_is_reverse method method test_j_alias_mode_is_reverse L123–125
+ test_j_alias_same_keys_as_json_flag method method test_j_alias_same_keys_as_json_flag L114–121
+ test_j_alias_total_is_int method method test_j_alias_total_is_int L137–139
+ test_j_alias_valid_json method method test_j_alias_valid_json L102–104
+ TestTypedDicts class class TestTypedDicts L223–251
+ test_has_duration_ms_annotation method method test_has_duration_ms_annotation L233–235
+ test_has_exit_code_annotation method method test_has_exit_code_annotation L229–231
+ test_impact_json_typeddict_exists method method test_impact_json_typeddict_exists L226–227
+ test_retains_address_annotation method method test_retains_address_annotation L245–247
+ test_retains_blast_radius_annotation method method test_retains_blast_radius_annotation L237–239
+ test_retains_mode_annotation method method test_retains_mode_annotation L241–243
+ test_retains_total_annotation method method test_retains_total_annotation L249–251
+ _env function function _env L36–37
+ _run function function _run L40–41
+ impact_repo function function impact_repo L50–87
+ CliRunner import import CliRunner L26–26
+ annotations import import annotations L18–18
+ json import import json L20–20
+ pathlib import import pathlib L21–21
+ pytest import import pytest L24–24
+ textwrap import import textwrap L22–22
+ runner variable variable runner L28–28
~ muse/cli/commands/impact.py .py 1 symbol added, 5 symbols modified
+ start_timer import import start_timer L92–92
~ run
← 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:f9c3a92662a7678834c5544ecc449451a06976b602c42816b262290d8303d086 --body "your comment"