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

supercharge(entangle): -j alias, exit_code, duration_ms, TypedDict, docstring

- Add -j alias for --json - Add _EntangleOutputJson TypedDict with exit_code and duration_ms annotations - Add elapsed = start_timer() timing at top of run() - Emit exit_code=0 and duration_ms=elapsed() in JSON output - Expand run() docstring with JSON envelope section documenting new fields - Add 38-test supercharge suite covering all agent-usability gaps

sha256:c453592e1d0aa2b4ad9584c6d8b31bb02cb66cf6a4311c3771a4149eeec6ba9e sha
+57 ~2 symbols
sha256:b4638db8e1015d324e0a30aff5ab77738a351eacca277bdceebe88b9aa67bd54 snapshot
+57
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 59 symbols
~ tests/test_entangle_supercharge.py .py 55 symbols added
+ TestAnsiSanitization class class TestAnsiSanitization L322–335
+ test_j_alias_output_no_ansi method method test_j_alias_output_no_ansi L329–331
+ test_json_output_no_ansi method method test_json_output_no_ansi L325–327
+ test_json_output_no_ansi_with_results method method test_json_output_no_ansi_with_results L333–335
+ TestDocstrings class class TestDocstrings L303–314
+ test_run_docstring_mentions_duration_ms method method test_run_docstring_mentions_duration_ms L311–314
+ test_run_docstring_mentions_exit_code method method test_run_docstring_mentions_exit_code L306–309
+ TestDurationMs class class TestDurationMs L179–209
+ test_duration_ms_with_min_co_changes method method test_duration_ms_with_min_co_changes L198–202
+ test_duration_ms_with_min_rate method method test_duration_ms_with_min_rate L204–209
+ test_j_alias_duration_ms_present method method test_j_alias_duration_ms_present L194–196
+ test_json_duration_ms_is_float method method test_json_duration_ms_is_float L190–192
+ test_json_duration_ms_nonnegative method method test_json_duration_ms_nonnegative L186–188
+ test_json_has_duration_ms method method test_json_has_duration_ms L182–184
+ TestExitCode class class TestExitCode L217–259
+ test_exit_code_mirrors_process_exit method method test_exit_code_mirrors_process_exit L237–239
+ test_exit_code_zero_empty_result method method test_exit_code_zero_empty_result L253–259
+ test_exit_code_zero_with_min_co_changes method method test_exit_code_zero_with_min_co_changes L241–246
+ test_exit_code_zero_with_top_filter method method test_exit_code_zero_with_top_filter L248–251
+ test_j_alias_exit_code_present method method test_j_alias_exit_code_present L233–235
+ test_json_exit_code_is_int method method test_json_exit_code_is_int L229–231
+ test_json_exit_code_zero method method test_json_exit_code_zero L224–227
+ test_json_has_exit_code method method test_json_has_exit_code L220–222
+ TestJsonAlias class class TestJsonAlias L121–171
+ test_j_alias_exits_zero method method test_j_alias_exits_zero L124–126
+ test_j_alias_has_commits_analysed_key method method test_j_alias_has_commits_analysed_key L136–138
+ test_j_alias_has_filters_key method method test_j_alias_has_filters_key L140–142
+ test_j_alias_has_pairs_key method method test_j_alias_has_pairs_key L132–134
+ test_j_alias_pair_count_matches_json_flag method method test_j_alias_pair_count_matches_json_flag L155–160
+ test_j_alias_same_top_level_keys_as_json_flag method method test_j_alias_same_top_level_keys_as_json_flag L144–153
+ test_j_alias_valid_json method method test_j_alias_valid_json L128–130
+ test_j_alias_with_min_co_changes method method test_j_alias_with_min_co_changes L162–166
+ test_j_alias_with_top_filter method method test_j_alias_with_top_filter L168–171
+ TestPerformance class class TestPerformance L343–356
+ test_duration_ms_is_float_not_int method method test_duration_ms_is_float_not_int L354–356
+ test_j_alias_duration_under_2000ms method method test_j_alias_duration_under_2000ms L350–352
+ test_json_duration_under_2000ms method method test_json_duration_under_2000ms L346–348
+ TestTypedDicts class class TestTypedDicts L267–295
+ test_entangle_output_json_typeddict_exists method method test_entangle_output_json_typeddict_exists L270–271
+ test_has_duration_ms_annotation method method test_has_duration_ms_annotation L277–279
+ test_has_exit_code_annotation method method test_has_exit_code_annotation L273–275
+ test_retains_commits_analysed_annotation method method test_retains_commits_analysed_annotation L285–287
+ test_retains_filters_annotation method method test_retains_filters_annotation L293–295
+ test_retains_pairs_annotation method method test_retains_pairs_annotation L281–283
+ test_retains_truncated_annotation method method test_retains_truncated_annotation L289–291
+ _env function function _env L38–39
+ _run function function _run L42–43
+ entangle_repo function function entangle_repo L52–113
+ CliRunner import import CliRunner L28–28
+ annotations import import annotations L20–20
+ json import import json L22–22
+ pathlib import import pathlib L23–23
+ pytest import import pytest L26–26
+ textwrap import import textwrap L24–24
+ runner variable variable runner L30–30
~ muse/cli/commands/entangle.py .py 2 symbols added, 2 symbols modified
+ _EntangleOutputJson class class _EntangleOutputJson L165–185
+ start_timer import import start_timer L101–101
~ 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:c453592e1d0aa2b4ad9584c6d8b31bb02cb66cf6a4311c3771a4149eeec6ba9e --body "your comment"