gabriel / muse public
feat patch semantic-cherry-pick task/supercharge-semantic-cherry-pick #1 / 1
AI Agent gabriel · 160 days ago · Apr 19, 2026 · Diff

feat(semantic-cherry-pick): supercharge for agents — -j/-n aliases, exit_code, duration_ms, _CherryPickResultJson TypedDict, expanded docstrings

- Add -j alias for --json in register() - Add -n alias for --dry-run in register() - Add _CherryPickResultJson TypedDict with all 11 envelope fields - Add start_timer() + elapsed() wired into run(); inject exit_code=0 + duration_ms into JSON - Expand register() docstring to list all 4 arguments with descriptions - Expand run() docstring to document -j/-n aliases, JSON envelope, exit_code, duration_ms - 43 new tests: TestJsonAlias, TestJsonEnvelope, TestTypedDict, TestCLIAliases, TestCLISecurity, TestDocstrings

sha256:72eb71ba85135caf448ac9f84f19f3ce1b89d134ca95812f72257d103d9745b0 sha
+64 ~2 symbols
sha256:d294a2aa492d7cc2132f3cfd7e70cfe8d21ba6ba0a5a86f168070488bc3f4db5 snapshot
+64
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 66 symbols
+ TestCLIAliases class class TestCLIAliases L298–328
+ test_n_alias_does_not_write method method test_n_alias_does_not_write L312–317
+ test_n_alias_dry_run_flag_true method method test_n_alias_dry_run_flag_true L305–310
+ test_n_alias_exits_zero method method test_n_alias_exits_zero L299–303
+ test_n_alias_same_output_as_dry_run method method test_n_alias_same_output_as_dry_run L319–328
+ TestCLISecurity class class TestCLISecurity L336–362
+ test_ansi_escape_not_in_json_stdout method method test_ansi_escape_not_in_json_stdout L344–348
+ test_null_byte_in_address_not_in_raw_stdout method method test_null_byte_in_address_not_in_raw_stdout L337–342
+ test_path_traversal_exit_code_zero method method test_path_traversal_exit_code_zero L357–362
+ test_path_traversal_in_address_is_not_found method method test_path_traversal_in_address_is_not_found L350–355
+ TestDocstrings class class TestDocstrings L370–403
+ test_register_docstring_exists method method test_register_docstring_exists L388–391
+ test_register_docstring_mentions_dry_run method method test_register_docstring_mentions_dry_run L397–399
+ test_register_docstring_mentions_from method method test_register_docstring_mentions_from L393–395
+ test_register_docstring_mentions_json method method test_register_docstring_mentions_json L401–403
+ test_run_docstring_exists method method test_run_docstring_exists L371–374
+ test_run_docstring_mentions_duration_ms method method test_run_docstring_mentions_duration_ms L384–386
+ test_run_docstring_mentions_exit_code method method test_run_docstring_mentions_exit_code L380–382
+ test_run_docstring_mentions_json method method test_run_docstring_mentions_json L376–378
+ TestJsonAlias class class TestJsonAlias L100–153
+ test_j_alias_dry_run_does_not_write method method test_j_alias_dry_run_does_not_write L148–153
+ test_j_alias_emits_valid_json method method test_j_alias_emits_valid_json L107–112
+ test_j_alias_exits_zero method method test_j_alias_exits_zero L101–105
+ test_j_alias_has_results method method test_j_alias_has_results L114–119
+ test_j_alias_same_applied_count method method test_j_alias_same_applied_count L133–139
+ test_j_alias_same_keys_as_json_flag method method test_j_alias_same_keys_as_json_flag L121–131
+ test_j_with_dry_run method method test_j_with_dry_run L141–146
+ TestJsonEnvelope class class TestJsonEnvelope L161–234
+ test_branch_field_present method method test_branch_field_present L199–205
+ test_duration_ms_is_positive_float method method test_duration_ms_is_positive_float L183–189
+ test_duration_ms_present_after_apply method method test_duration_ms_present_after_apply L214–219
+ test_exit_code_is_zero method method test_exit_code_is_zero L169–174
+ test_exit_code_present_after_apply method method test_exit_code_present_after_apply L207–212
+ test_has_duration_ms method method test_has_duration_ms L176–181
+ test_has_exit_code method method test_has_exit_code L162–167
+ test_not_found_still_has_duration_ms method method test_not_found_still_has_duration_ms L229–234
+ test_not_found_still_has_exit_code method method test_not_found_still_has_exit_code L221–227
+ test_schema_version_is_nonempty_string method method test_schema_version_is_nonempty_string L191–197
+ TestTypedDict class class TestTypedDict L242–290
+ test_cherry_pick_result_json_importable method method test_cherry_pick_result_json_importable L243–245
+ test_has_applied_field method method test_has_applied_field L277–280
+ test_has_branch_field method method test_has_branch_field L267–270
+ test_has_dry_run_field method method test_has_dry_run_field L272–275
+ test_has_duration_ms_field method method test_has_duration_ms_field L252–255
+ test_has_exit_code_field method method test_has_exit_code_field L247–250
+ test_has_failed_field method method test_has_failed_field L282–285
+ test_has_results_field method method test_has_results_field L262–265
+ test_has_schema_version_field method method test_has_schema_version_field L257–260
+ test_has_unverified_field method method test_has_unverified_field L287–290
+ _commit function function _commit L48–52
+ _first_commit_id function function _first_commit_id L88–92
+ _run function function _run L44–45
+ cli variable variable cli L35–35
+ CliRunner import import CliRunner L33–33
+ annotations import import annotations L24–24
+ json import import json L26–26
+ pathlib import import pathlib L27–27
+ pytest import import pytest L31–31
+ textwrap import import textwrap L28–28
+ typing import import typing L29–29
+ runner variable variable runner L36–36
+ two_commit_repo function function two_commit_repo L61–85
~ muse/cli/commands/semantic_cherry_pick.py .py 2 symbols added, 2 symbols modified
+ _CherryPickResultJson class class _CherryPickResultJson L93–106
+ start_timer import import start_timer L69–69
~ run
← Older Oldest on task/supercharge-semantic-cherry-pick
All commits
Newer → Latest on task/supercharge-semantic-cherry-pick

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:72eb71ba85135caf448ac9f84f19f3ce1b89d134ca95812f72257d103d9745b0 --body "your comment"