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

feat(coverage): supercharge for agent usability

- Add -j alias for --json - Add exit_code and duration_ms to _CoveragePayload TypedDict - Wire start_timer(); emit exit_code=0, duration_ms=elapsed() in JSON payload - Update run() docstring with JSON envelope section - 36 new TDD tests in test_coverage_supercharge.py

sha256:f5da0ee959ef4a1043a0dfc829652573b44803e5672bc59a7447c03ae48a8929 sha
+56 ~3 symbols
sha256:edc0276a696300dbe5fd71147e7f80ee595505a05eabdf1d05833322949af58e snapshot
+56
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 59 symbols
~ tests/test_coverage_supercharge.py .py 55 symbols added
+ TestAnsiSanitization class class TestAnsiSanitization L305–320
+ test_j_alias_output_no_ansi method method test_j_alias_output_no_ansi L312–314
+ test_json_output_no_ansi method method test_json_output_no_ansi L308–310
+ test_json_output_no_ansi_with_exclude_dunder method method test_json_output_no_ansi_with_exclude_dunder L316–320
+ TestDocstrings class class TestDocstrings L286–297
+ test_run_docstring_mentions_duration_ms method method test_run_docstring_mentions_duration_ms L294–297
+ test_run_docstring_mentions_exit_code method method test_run_docstring_mentions_exit_code L289–292
+ TestDurationMs class class TestDurationMs L170–200
+ test_duration_ms_with_compare method method test_duration_ms_with_compare L195–200
+ test_duration_ms_with_exclude_dunder method method test_duration_ms_with_exclude_dunder L189–193
+ test_j_alias_duration_ms_present method method test_j_alias_duration_ms_present L185–187
+ test_json_duration_ms_is_float method method test_json_duration_ms_is_float L181–183
+ test_json_duration_ms_nonnegative method method test_json_duration_ms_nonnegative L177–179
+ test_json_has_duration_ms method method test_json_has_duration_ms L173–175
+ TestExitCode class class TestExitCode L208–242
+ test_exit_code_mirrors_process_exit method method test_exit_code_mirrors_process_exit L228–230
+ test_exit_code_zero_with_compare method method test_exit_code_zero_with_compare L239–242
+ test_exit_code_zero_with_exclude_dunder method method test_exit_code_zero_with_exclude_dunder L232–237
+ test_j_alias_exit_code_present method method test_j_alias_exit_code_present L224–226
+ test_json_exit_code_is_int method method test_json_exit_code_is_int L220–222
+ test_json_exit_code_zero method method test_json_exit_code_zero L215–218
+ test_json_has_exit_code method method test_json_has_exit_code L211–213
+ TestJsonAlias class class TestJsonAlias L118–162
+ test_j_alias_address_reflected method method test_j_alias_address_reflected L160–162
+ test_j_alias_exits_zero method method test_j_alias_exits_zero L121–123
+ test_j_alias_has_methods_key method method test_j_alias_has_methods_key L129–131
+ test_j_alias_has_percent_key method method test_j_alias_has_percent_key L133–135
+ test_j_alias_method_count_matches_json_flag method method test_j_alias_method_count_matches_json_flag L148–153
+ test_j_alias_same_top_level_keys_as_json_flag method method test_j_alias_same_top_level_keys_as_json_flag L137–146
+ test_j_alias_valid_json method method test_j_alias_valid_json L125–127
+ test_j_alias_with_exclude_dunder method method test_j_alias_with_exclude_dunder L155–158
+ TestPerformance class class TestPerformance L328–341
+ test_duration_ms_is_float_not_int method method test_duration_ms_is_float_not_int L339–341
+ test_j_alias_duration_under_2000ms method method test_j_alias_duration_under_2000ms L335–337
+ test_json_duration_under_2000ms method method test_json_duration_under_2000ms L331–333
+ TestTypedDicts class class TestTypedDicts L250–278
+ test_coverage_payload_typeddict_exists method method test_coverage_payload_typeddict_exists L253–254
+ test_has_duration_ms_annotation method method test_has_duration_ms_annotation L260–262
+ test_has_exit_code_annotation method method test_has_exit_code_annotation L256–258
+ test_retains_address_annotation method method test_retains_address_annotation L264–266
+ test_retains_filters_annotation method method test_retains_filters_annotation L276–278
+ test_retains_methods_annotation method method test_retains_methods_annotation L268–270
+ test_retains_percent_annotation method method test_retains_percent_annotation L272–274
+ _ADDR variable variable _ADDR L33–33
+ _env function function _env L41–42
+ _run function function _run L45–46
+ coverage_repo function function coverage_repo L55–110
+ CliRunner import import CliRunner L29–29
+ annotations import import annotations L20–20
+ json import import json L22–22
+ os import import os L23–23
+ pathlib import import pathlib L24–24
+ pytest import import pytest L27–27
+ textwrap import import textwrap L25–25
+ runner variable variable runner L31–31
~ muse/cli/commands/coverage.py .py 1 symbol added, 3 symbols modified
+ start_timer import import start_timer L107–107
~ 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:f5da0ee959ef4a1043a0dfc829652573b44803e5672bc59a7447c03ae48a8929 --body "your comment"