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

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

- Add from typing import Any, TypedDict - Add from muse.core.timing import start_timer - Add _FindSymbolOutputJson TypedDict with exit_code and duration_ms annotations - Add -j alias for --json - Add elapsed = start_timer() at top of run() - Emit exit_code=0 and duration_ms=elapsed() in JSON output - Expand run() docstring with JSON envelope section - Add 40-test supercharge suite covering all agent-usability gaps

sha256:57ab4962fb0522ce131b007a529b55ae8b004fae5d6e79210dc05b95faec525a sha
+61 ~2 symbols
sha256:5a7aac85ac9c6357958eff11cdc16052c92d54d61e7938f41c43715f62f5ebda snapshot
+61
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 63 symbols
~ tests/test_find_symbol_supercharge.py .py 57 symbols added
+ TestAnsiSanitization class class TestAnsiSanitization L318–331
+ test_j_alias_output_no_ansi method method test_j_alias_output_no_ansi L325–327
+ test_json_output_no_ansi method method test_json_output_no_ansi L321–323
+ test_json_output_no_ansi_with_results method method test_json_output_no_ansi_with_results L329–331
+ TestDocstrings class class TestDocstrings L299–310
+ test_run_docstring_mentions_duration_ms method method test_run_docstring_mentions_duration_ms L307–310
+ test_run_docstring_mentions_exit_code method method test_run_docstring_mentions_exit_code L302–305
+ TestDurationMs class class TestDurationMs L171–207
+ test_duration_ms_no_results method method test_duration_ms_no_results L202–207
+ test_duration_ms_with_kind_filter method method test_duration_ms_with_kind_filter L190–194
+ test_duration_ms_with_limit method method test_duration_ms_with_limit L196–200
+ test_j_alias_duration_ms_present method method test_j_alias_duration_ms_present L186–188
+ test_json_duration_ms_is_float method method test_json_duration_ms_is_float L182–184
+ test_json_duration_ms_nonnegative method method test_json_duration_ms_nonnegative L178–180
+ test_json_has_duration_ms method method test_json_has_duration_ms L174–176
+ TestExitCode class class TestExitCode L215–255
+ test_exit_code_mirrors_process_exit method method test_exit_code_mirrors_process_exit L235–237
+ test_exit_code_zero_empty_result method method test_exit_code_zero_empty_result L239–245
+ test_exit_code_zero_with_kind_filter method method test_exit_code_zero_with_kind_filter L247–250
+ test_exit_code_zero_with_limit method method test_exit_code_zero_with_limit L252–255
+ test_j_alias_exit_code_present method method test_j_alias_exit_code_present L231–233
+ test_json_exit_code_is_int method method test_json_exit_code_is_int L227–229
+ test_json_exit_code_zero method method test_json_exit_code_zero L222–225
+ test_json_has_exit_code method method test_json_has_exit_code L218–220
+ TestJsonAlias class class TestJsonAlias L107–163
+ test_j_alias_exits_zero method method test_j_alias_exits_zero L110–112
+ test_j_alias_has_query_key method method test_j_alias_has_query_key L126–128
+ test_j_alias_has_results_key method method test_j_alias_has_results_key L118–120
+ test_j_alias_has_total_key method method test_j_alias_has_total_key L122–124
+ test_j_alias_result_count_matches_json_flag method method test_j_alias_result_count_matches_json_flag L141–146
+ test_j_alias_same_top_level_keys_as_json_flag method method test_j_alias_same_top_level_keys_as_json_flag L130–139
+ test_j_alias_valid_json method method test_j_alias_valid_json L114–116
+ test_j_alias_with_kind_filter method method test_j_alias_with_kind_filter L154–158
+ test_j_alias_with_limit method method test_j_alias_with_limit L160–163
+ test_j_alias_with_name_filter method method test_j_alias_with_name_filter L148–152
+ TestPerformance class class TestPerformance L339–352
+ test_duration_ms_is_float_not_int method method test_duration_ms_is_float_not_int L350–352
+ test_j_alias_duration_under_2000ms method method test_j_alias_duration_under_2000ms L346–348
+ test_json_duration_under_2000ms method method test_json_duration_under_2000ms L342–344
+ TestTypedDicts class class TestTypedDicts L263–291
+ test_find_symbol_output_json_typeddict_exists method method test_find_symbol_output_json_typeddict_exists L266–267
+ test_has_duration_ms_annotation method method test_has_duration_ms_annotation L273–275
+ test_has_exit_code_annotation method method test_has_exit_code_annotation L269–271
+ test_retains_branch_presence_annotation method method test_retains_branch_presence_annotation L289–291
+ test_retains_query_annotation method method test_retains_query_annotation L285–287
+ test_retains_results_annotation method method test_retains_results_annotation L277–279
+ test_retains_total_annotation method method test_retains_total_annotation L281–283
+ _env function function _env L38–39
+ _run function function _run L42–43
+ find_repo function function find_repo L52–99
+ 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/find_symbol.py .py 4 symbols added, 2 symbols modified
+ _FindSymbolOutputJson class class _FindSymbolOutputJson L126–148
+ Any import import Any L96–96
+ TypedDict import import TypedDict L96–96
+ 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:57ab4962fb0522ce131b007a529b55ae8b004fae5d6e79210dc05b95faec525a --body "your comment"