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

feat(stable): supercharge with TypedDict, -j alias, and JSON envelope

- Add _StableJson / _StableEntry / _StableFilters TypedDicts - Add -j alias for --json - Inject schema_version, exit_code, duration_ms into JSON output - Expand register() docstring listing all 9 arguments - Expand run() docstring documenting all JSON envelope fields - 48 new seven-tier tests (unit, integration, e2e, stress, data integrity, security, performance)

sha256:2215f3d1828aaad91521a8d136cba0a0d9bb81e20aa132407f2a44e3b71d804d sha
+79 ~2 symbols
sha256:1b87046268d8944c7ccf947aeb99feec483839a2d0036b4f966e0a13bcfb8d70 snapshot
+79
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 81 symbols
~ tests/test_stable_supercharge.py .py 73 symbols added
+ TestAliasRegistration class class TestAliasRegistration L135–151
+ _parser method method _parser L136–142
+ test_j_alias_sets_as_json method method test_j_alias_sets_as_json L144–146
+ test_j_alias_with_other_flags method method test_j_alias_with_other_flags L148–151
+ TestDataIntegrity class class TestDataIntegrity L359–399
+ test_filters_reflect_input_flags method method test_filters_reflect_input_flags L388–393
+ test_max_commits_cap_respected method method test_max_commits_cap_respected L395–399
+ test_since_start_of_range_is_bool method method test_since_start_of_range_is_bool L371–374
+ test_stable_fn_has_higher_stability_than_hot_fn method method test_stable_fn_has_higher_stability_than_hot_fn L376–386
+ test_stable_list_sorted_descending method method test_stable_list_sorted_descending L360–363
+ test_unchanged_for_is_nonnegative_int method method test_unchanged_for_is_nonnegative_int L365–369
+ TestDocstrings class class TestDocstrings L159–175
+ test_register_docstring_lists_flags method method test_register_docstring_lists_flags L160–163
+ test_run_docstring_mentions_duration_ms method method test_run_docstring_mentions_duration_ms L169–171
+ test_run_docstring_mentions_exit_code method method test_run_docstring_mentions_exit_code L165–167
+ test_run_docstring_mentions_schema_version method method test_run_docstring_mentions_schema_version L173–175
+ TestEndToEnd class class TestEndToEnd L244–299
+ test_commits_analysed_positive method method test_commits_analysed_positive L279–281
+ test_default_text_mentions_bedrock method method test_default_text_mentions_bedrock L248–249
+ test_default_text_output_exits_zero method method test_default_text_output_exits_zero L245–246
+ test_filters_dict_present method method test_filters_dict_present L288–290
+ test_from_ref_and_to_ref_present method method test_from_ref_and_to_ref_present L292–295
+ test_invalid_since_ref_exits_nonzero method method test_invalid_since_ref_exits_nonzero L297–299
+ test_json_stable_entry_has_address method method test_json_stable_entry_has_address L255–258
+ test_json_stable_entry_has_since_start_of_range method method test_json_stable_entry_has_since_start_of_range L264–266
+ test_json_stable_entry_has_unchanged_for method method test_json_stable_entry_has_unchanged_for L260–262
+ test_json_stable_list_is_list method method test_json_stable_list_is_list L251–253
+ test_kind_filter_restricts_results method method test_kind_filter_restricts_results L272–277
+ test_top_flag_limits_results method method test_top_flag_limits_results L268–270
+ test_truncated_flag_present method method test_truncated_flag_present L283–286
+ TestJsonAlias class class TestJsonAlias L220–236
+ test_j_alias_exit_code_zero method method test_j_alias_exit_code_zero L221–222
+ test_j_alias_same_top_level_keys method method test_j_alias_same_top_level_keys L228–231
+ test_j_alias_stable_list_matches method method test_j_alias_stable_list_matches L233–236
+ test_j_alias_valid_json method method test_j_alias_valid_json L224–226
+ TestJsonEnvelope class class TestJsonEnvelope L183–212
+ test_duration_ms_nonnegative_float method method test_duration_ms_nonnegative_float L200–203
+ test_exit_code_is_int method method test_exit_code_is_int L192–194
+ test_exit_code_zero method method test_exit_code_zero L188–190
+ test_has_duration_ms method method test_has_duration_ms L196–198
+ test_has_exit_code method method test_has_exit_code L184–186
+ test_has_schema_version method method test_has_schema_version L205–207
+ test_schema_version_nonempty_string method method test_schema_version_nonempty_string L209–212
+ TestPerformance class class TestPerformance L435–438
+ test_duration_ms_under_10000 method method test_duration_ms_under_10000 L436–438
+ TestSecurity class class TestSecurity L407–427
+ test_ansi_in_kind_filter_not_echoed_raw method method test_ansi_in_kind_filter_not_echoed_raw L408–411
+ test_ansi_in_language_filter_not_echoed_raw method method test_ansi_in_language_filter_not_echoed_raw L413–418
+ test_ansi_in_since_ref_not_echoed_raw method method test_ansi_in_since_ref_not_echoed_raw L420–423
+ test_null_byte_in_kind_does_not_crash method method test_null_byte_in_kind_does_not_crash L425–427
+ TestStress class class TestStress L307–351
+ test_concurrent_stable_separate_repos method method test_concurrent_stable_separate_repos L324–351
+ test_many_commits_does_not_crash method method test_many_commits_does_not_crash L308–322
+ TestTypedDict class class TestTypedDict L103–127
+ test_has_duration_ms method method test_has_duration_ms L112–115
+ test_has_exit_code method method test_has_exit_code L107–110
+ test_has_schema_version method method test_has_schema_version L117–120
+ test_retains_core_fields method method test_retains_core_fields L122–127
+ test_stable_json_typed_dict_exists method method test_stable_json_typed_dict_exists L104–105
+ _commit function function _commit L49–60
+ _invoke function function _invoke L36–42
+ _stable function function _stable L45–46
+ CliRunner import import CliRunner L26–26
+ InvokeResult import import InvokeResult L26–26
+ annotations import import annotations L16–16
+ json import import json L18–18
+ os import import os L19–19
+ pathlib import import pathlib L20–20
+ pytest import import pytest L24–24
+ textwrap import import textwrap L21–21
+ threading import import threading L22–22
+ runner variable variable runner L28–28
+ stable_repo function function stable_repo L64–95
~ muse/cli/commands/stable.py .py 6 symbols added, 2 symbols modified
+ _StableEntry class class _StableEntry L62–65
+ _StableFilters class class _StableFilters L68–75
+ _StableJson class class _StableJson L78–87
+ TypedDict import import TypedDict L45–45
+ __version__ import import __version__ L47–47
+ start_timer import import start_timer L51–51
~ 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:2215f3d1828aaad91521a8d136cba0a0d9bb81e20aa132407f2a44e3b71d804d --body "your comment"