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

feat(dead): supercharge for agent usability

- Add -j alias for --json in register() - Add exit_code: int to _DeadPayload TypedDict - Add exit_code=0 to JSON emit (all error paths raise SystemExit before JSON) - Expand run() docstring with JSON envelope section (exit_code, duration_ms) - Add tests/test_dead_supercharge.py: 37 tests across 7 classes (TestJsonAlias, TestDurationMs, TestExitCode, TestTypedDicts, TestDocstrings, TestAnsiSanitization, TestPerformance — 5000ms budget)

sha256:178247e8728633801aa706f107c872f3488bd67d845b1b5fd21a2160a6009657 sha
+54 ~3 symbols
sha256:95dd4e38a1171055e18be8024abf896e19d257394559fe1a03ca1959cd176540 snapshot
+54
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 57 symbols
~ tests/test_dead_supercharge.py .py 54 symbols added
+ TestAnsiSanitization class class TestAnsiSanitization L301–316
+ test_j_alias_output_no_ansi method method test_j_alias_output_no_ansi L308–310
+ test_json_output_no_ansi method method test_json_output_no_ansi L304–306
+ test_json_output_no_ansi_with_high_confidence method method test_json_output_no_ansi_with_high_confidence L312–316
+ TestDocstrings class class TestDocstrings L282–293
+ test_run_docstring_mentions_duration_ms method method test_run_docstring_mentions_duration_ms L290–293
+ test_run_docstring_mentions_exit_code method method test_run_docstring_mentions_exit_code L285–288
+ TestDurationMs class class TestDurationMs L160–191
+ test_duration_ms_with_compare method method test_duration_ms_with_compare L187–191
+ test_duration_ms_with_high_confidence_filter method method test_duration_ms_with_high_confidence_filter L179–185
+ test_j_alias_duration_ms_present method method test_j_alias_duration_ms_present L175–177
+ test_json_duration_ms_is_float method method test_json_duration_ms_is_float L171–173
+ test_json_duration_ms_nonnegative method method test_json_duration_ms_nonnegative L167–169
+ test_json_has_duration_ms method method test_json_has_duration_ms L163–165
+ TestExitCode class class TestExitCode L199–238
+ test_exit_code_mirrors_process_exit method method test_exit_code_mirrors_process_exit L219–221
+ test_exit_code_zero_with_compare method method test_exit_code_zero_with_compare L230–233
+ test_exit_code_zero_with_high_confidence_filter method method test_exit_code_zero_with_high_confidence_filter L223–228
+ test_exit_code_zero_with_kind_filter method method test_exit_code_zero_with_kind_filter L235–238
+ test_j_alias_exit_code_present method method test_j_alias_exit_code_present L215–217
+ test_json_exit_code_is_int method method test_json_exit_code_is_int L211–213
+ test_json_exit_code_zero method method test_json_exit_code_zero L206–209
+ test_json_has_exit_code method method test_json_has_exit_code L202–204
+ TestJsonAlias class class TestJsonAlias L103–152
+ test_j_alias_exits_zero method method test_j_alias_exits_zero L106–108
+ test_j_alias_has_duration_ms_key method method test_j_alias_has_duration_ms_key L118–120
+ test_j_alias_has_results_key method method test_j_alias_has_results_key L114–116
+ test_j_alias_result_count_matches_json_flag method method test_j_alias_result_count_matches_json_flag L133–138
+ test_j_alias_same_top_level_keys_as_json_flag method method test_j_alias_same_top_level_keys_as_json_flag L122–131
+ test_j_alias_valid_json method method test_j_alias_valid_json L110–112
+ test_j_alias_with_high_confidence_only method method test_j_alias_with_high_confidence_only L140–145
+ test_j_alias_with_kind_filter method method test_j_alias_with_kind_filter L147–152
+ TestPerformance class class TestPerformance L324–342
+ test_duration_ms_is_float_not_int method method test_duration_ms_is_float_not_int L340–342
+ test_j_alias_duration_under_5000ms method method test_j_alias_duration_under_5000ms L336–338
+ test_json_duration_under_5000ms method method test_json_duration_under_5000ms L332–334
+ TestTypedDicts class class TestTypedDicts L246–274
+ test_dead_payload_typeddict_exists method method test_dead_payload_typeddict_exists L249–250
+ test_has_duration_ms_annotation method method test_has_duration_ms_annotation L256–258
+ test_has_exit_code_annotation method method test_has_exit_code_annotation L252–254
+ test_retains_high_confidence_count_annotation method method test_retains_high_confidence_count_annotation L264–266
+ test_retains_results_annotation method method test_retains_results_annotation L260–262
+ test_retains_source_annotation method method test_retains_source_annotation L268–270
+ test_retains_total_files_scanned_annotation method method test_retains_total_files_scanned_annotation L272–274
+ _env function function _env L41–42
+ _run function function _run L45–46
+ dead_repo function function dead_repo L55–95
+ CliRunner import import CliRunner L31–31
+ annotations import import annotations L23–23
+ json import import json L25–25
+ pathlib import import pathlib L26–26
+ pytest import import pytest L29–29
+ textwrap import import textwrap L27–27
+ runner variable variable runner L33–33
~ muse/cli/commands/dead.py .py 3 symbols modified
← 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:178247e8728633801aa706f107c872f3488bd67d845b1b5fd21a2160a6009657 --body "your comment"