feat(code age): supercharge for agents — -j alias, exit_code, duration_ms, envelope TypedDicts
- Add `-j` as shorthand alias for `--json` (store_true, dest=as_json) - Import start_timer; add elapsed = start_timer() at top of run() - Emit exit_code=0 and duration_ms=elapsed() on all three JSON paths: no-symbols early return, --explain JSON, and main list output - Add _NoSymbolsJson, _AgeListJson, _ExplainJson TypedDicts for type-safe construction of every JSON envelope shape - Update run() docstring to document exit_code and duration_ms fields - Add tests/test_age_supercharge.py (31 tests across 7 classes): TestJsonAlias, TestDurationMs, TestExitCode, TestTypedDicts, TestDocstrings, TestAnsiSanitization, TestPerformance
sha256:799eeabe70ac33b0d2f10cd7c20bc37cd461b10ee656519977ef4e11462ec388
sha
+63
~2
symbols
sha256:e05647336280b8f024c5c18f1b187379776e4ce3e9903c19377920b40067dcae
snapshot
+63
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
65 symbols
+
test_run_docstring_mentions_duration_ms
method
method test_run_docstring_mentions_duration_ms L327–330
+
test_run_docstring_mentions_exit_code
method
method test_run_docstring_mentions_exit_code L322–325
+
test_explain_json_duration_ms_is_float
method
method test_explain_json_duration_ms_is_float L202–206
+
test_explain_json_duration_ms_nonnegative
method
method test_explain_json_duration_ms_nonnegative L196–200
+
test_main_json_duration_ms_nonnegative
method
method test_main_json_duration_ms_nonnegative L180–183
+
test_explain_json_exit_code_zero_on_success
method
method test_explain_json_exit_code_zero_on_success L244–249
+
test_main_json_exit_code_zero_on_success
method
method test_main_json_exit_code_zero_on_success L227–231
+
test_j_alias_explain_same_keys_as_json_flag
method
method test_j_alias_explain_same_keys_as_json_flag L156–164
+
test_j_alias_same_top_level_keys_as_json_flag
method
method test_j_alias_same_top_level_keys_as_json_flag L147–154
+
test_duration_ms_type_is_float_not_int
method
method test_duration_ms_type_is_float_not_int L382–391
+
test_explain_json_duration_under_1000ms
method
method test_explain_json_duration_under_1000ms L376–380
+
test_age_list_json_has_duration_ms_annotation
method
method test_age_list_json_has_duration_ms_annotation L283–285
+
test_age_list_json_has_exit_code_annotation
method
method test_age_list_json_has_exit_code_annotation L279–281
+
test_age_list_json_has_symbols_annotation
method
method test_age_list_json_has_symbols_annotation L287–289
+
test_explain_json_has_duration_ms_annotation
method
method test_explain_json_has_duration_ms_annotation L298–300
+
test_explain_json_has_events_annotation
method
method test_explain_json_has_events_annotation L302–304
+
test_explain_json_has_exit_code_annotation
method
method test_explain_json_has_exit_code_annotation L294–296
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:799eeabe70ac33b0d2f10cd7c20bc37cd461b10ee656519977ef4e11462ec388 --body "your comment"
No comments yet. Be the first to start the discussion.