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

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

- Add _SymbolLogJson TypedDict with schema_version, exit_code, duration_ms - Add -j alias for --json - Inject schema_version, exit_code, duration_ms into JSON output - Expand register() docstring listing all arguments including --json/-j - Expand run() docstring documenting all JSON envelope fields - 69 new seven-tier tests (unit, integration, e2e, stress, data integrity, security, performance)

sha256:468b2b17c62572bca79660bfac00f862464df1886ed0eaa05de0cc8300ec7367 sha
+109 ~3 symbols
sha256:989865a09f68d173c84c0c3cac69b0a0466b30157d62a4c6b2023eb861376ef4 snapshot
+109
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 112 symbols
~ tests/test_symbol_log_supercharge.py .py 104 symbols added
+ TestAliasRegistration class class TestAliasRegistration L359–376
+ test_j_alias_registered method method test_j_alias_registered L360–367
+ test_json_flag_sets_as_json_true method method test_json_flag_sets_as_json_true L369–376
+ TestDataIntegrity class class TestDataIntegrity L548–603
+ test_events_in_json_are_chronological method method test_events_in_json_are_chronological L566–572
+ test_json_serialisable method method test_json_serialisable L600–603
+ test_new_address_none_for_modified method method test_new_address_none_for_ L594–598
+ test_rename_tracking_continues_with_new_address method method test_rename_tracking_continues_with_new_address L584–592
+ test_to_dict_preserves_all_fields method method test_to_dict_preserves_all_fields L549–564
+ test_total_commits_scanned_is_int method method test_total_commits_scanned_is_int L574–577
+ test_truncated_is_bool method method test_truncated_is_bool L579–582
+ TestDocstrings class class TestDocstrings L379–395
+ test_register_mentions_json_alias method method test_register_mentions_json_alias L380–383
+ test_run_mentions_duration_ms method method test_run_mentions_duration_ms L389–391
+ test_run_mentions_exit_code method method test_run_mentions_exit_code L385–387
+ test_run_mentions_schema_version method method test_run_mentions_schema_version L393–395
+ TestEndToEnd class class TestEndToEnd L442–494
+ test_bad_address_no_double_colon_exits_nonzero method method test_bad_address_no_double_colon_exits_nonzero L452–454
+ test_human_output_shows_symbol_header method method test_human_output_shows_symbol_header L491–494
+ test_invalid_from_ref_exits_nonzero method method test_invalid_from_ref_exits_nonzero L472–474
+ test_json_address_field_matches_input method method test_json_address_field_matches_input L476–479
+ test_json_events_is_list method method test_json_events_is_list L481–484
+ test_max_1_sets_truncated_true_in_json method method test_max_1_sets_truncated_true_in_json L456–461
+ test_max_1_shows_truncation_warning_in_human method method test_max_1_shows_truncation_warning_in_human L463–466
+ test_max_zero_exits_nonzero method method test_max_zero_exits_nonzero L468–470
+ test_start_ref_is_head_by_default method method test_start_ref_is_head_by_default L486–489
+ test_unknown_symbol_exits_zero_with_no_events method method test_unknown_symbol_exits_zero_with_no_events L447–450
+ test_valid_symbol_exits_zero method method test_valid_symbol_exits_zero L443–445
+ TestFindEventsInCommit class class TestFindEventsInCommit L283–351
+ test_delete_moved_to_produces_moved method method test_delete_moved_to_produces_moved L306–310
+ test_delete_produces_deleted method method test_delete_produces_deleted L299–304
+ test_insert_produces_created method method test_insert_produces_created L291–297
+ test_no_delta_returns_empty method method test_no_delta_returns_empty L284–289
+ test_patch_wrapper_is_flattened method method test_patch_wrapper_is_flattened L339–344
+ test_replace_moved_to_produces_moved method method test_replace_moved_to_produces_moved L327–331
+ test_replace_produces_modified method method test_replace_produces_ L312–317
+ test_replace_renamed_to_updates_address method method test_replace_renamed_to_updates_address L319–325
+ test_replace_signature_produces_signature method method test_replace_signature_produces_signature L333–337
+ test_unrelated_address_produces_no_events method method test_unrelated_address_produces_no_events L346–351
+ TestFlatOps class class TestFlatOps L252–275
+ test_empty_ops_returns_empty method method test_empty_ops_returns_empty L273–275
+ test_flattens_patch_children method method test_flattens_patch_children L258–263
+ test_mixed_ops_preserved_in_order method method test_mixed_ops_preserved_in_order L265–271
+ test_passthrough_non_patch method method test_passthrough_non_patch L253–256
+ TestJsonAlias class class TestJsonAlias L424–434
+ test_j_parity_with_json_flag method method test_j_parity_with_json_flag L425–434
+ TestJsonEnvelope class class TestJsonEnvelope L398–421
+ test_duration_ms_present_and_float method method test_duration_ms_present_and_float L410–415
+ test_exit_code_zero method method test_exit_code_zero L404–408
+ test_schema_version_nonempty_string method method test_schema_version_nonempty_string L417–421
+ test_schema_version_present method method test_schema_version_present L399–402
+ TestPerformance class class TestPerformance L652–667
+ test_1000_to_dict_under_500ms method method test_1000_to_dict_under_500ms L653–660
+ test_duration_ms_present_and_reasonable method method test_duration_ms_present_and_reasonable L662–667
+ TestSecurity class class TestSecurity L611–644
+ test_ansi_in_address_does_not_crash method method test_ansi_in_address_does_not_crash L612–615
+ test_ansi_in_commit_message_survives_to_dict method method test_ansi_in_commit_message_survives_to_dict L617–622
+ test_hostile_detail_survives_json_serialisation method method test_hostile_detail_survives_json_serialisation L633–638
+ test_unicode_in_address_does_not_crash method method test_unicode_in_address_does_not_crash L629–631
+ test_very_long_address_does_not_crash method method test_very_long_address_does_not_crash L624–627
+ test_very_long_message_in_commit_does_not_crash method method test_very_long_message_in_commit_does_not_crash L640–644
+ TestStress class class TestStress L502–540
+ test_1000_symbol_event_constructions method method test_1000_symbol_event_constructions L503–508
+ test_1000_to_dict_calls method method test_1000_to_dict_calls L510–516
+ test_concurrent_find_events method method test_concurrent_find_events L525–540
+ test_flat_ops_10000_calls method method test_flat_ops_10000_calls L518–523
+ TestSymbolEvent class class TestSymbolEvent L194–244
+ test_constructor_default_new_address_is_none method method test_constructor_default_new_address_is_none L210–213
+ test_constructor_stores_address method method test_constructor_stores_address L200–203
+ test_constructor_stores_detail method method test_constructor_stores_detail L205–208
+ test_constructor_stores_kind method method test_constructor_stores_kind L195–198
+ test_constructor_stores_new_address method method test_constructor_stores_new_address L215–218
+ test_to_dict_committed_at_is_isoformat method method test_to_dict_committed_at_is_isoformat L233–239
+ test_to_dict_event_matches_kind method method test_to_dict_event_matches_kind L228–231
+ test_to_dict_has_all_fields method method test_to_dict_has_all_fields L220–226
+ test_to_dict_new_address_none_when_not_set method method test_to_dict_new_address_none_when_not_set L241–244
+ TestTypedDict class class TestTypedDict L166–186
+ test_has_core_fields method method test_has_core_fields L182–186
+ test_has_duration_ms method method test_has_duration_ms L178–180
+ test_has_exit_code method method test_has_exit_code L174–176
+ test_has_schema_version method method test_has_schema_version L170–172
+ test_symbol_log_json_exists method method test_symbol_log_json_exists L167–168
+ _commit function function _commit L40–51
+ _delete_delta function function _delete_delta L138–139
+ _insert_delta function function _insert_delta L134–135
+ _invoke function function _invoke L54–60
+ _make_commit function function _make_commit L114–131
+ _patch_delta function function _patch_delta L146–158
+ _replace_delta function function _replace_delta L142–143
+ _symlog function function _symlog L63–64
+ CliRunner import import CliRunner L30–30
+ InvokeResult import import InvokeResult L30–30
+ annotations import import annotations L17–17
+ datetime import import datetime L19–19
+ get_type_hints import import get_type_hints L26–26
+ json import import json L20–20
+ os import import os L21–21
+ pathlib import import pathlib L22–22
+ pytest import import pytest L28–28
+ textwrap import import textwrap L23–23
+ threading import import threading L24–24
+ time import import time L25–25
+ runner variable variable runner L32–32
+ sym_repo function function sym_repo L68–106
~ muse/cli/commands/symbol_log.py .py 5 symbols added, 3 symbols modified
+ _SymbolLogJson class class _SymbolLogJson L93–101
+ Any import import Any L76–76
+ TypedDict import import TypedDict L76–76
+ __version__ import import __version__ L78–78
+ start_timer import import start_timer L87–87
~ 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:468b2b17c62572bca79660bfac00f862464df1886ed0eaa05de0cc8300ec7367 --body "your comment"