feat(breakage): supercharge for agents — -j alias, exit_code, duration_ms in JSON
- Add -j alias for --json (matches all other supercharged commands) - Add _BreakageOutputJson TypedDict covering all 11 existing keys plus exit_code + duration_ms - Add start_timer() → elapsed() wired to duration_ms in JSON envelope - exit_code in JSON mirrors computed process exit (0=clean, 1=errors/strict-warnings) — NOT hardcoded 0 - Update run() docstring with JSON envelope section documenting exit_code and duration_ms - Add tests/test_breakage_supercharge.py (38 tests): TestJsonAlias, TestDurationMs, TestExitCode, TestTypedDicts, TestDocstrings, TestAnsiSanitization, TestPerformance
sha256:62d4abbeadfbdc06aff93b4ad8aa39622aaff6dcc6f6881848d6efb32e3d36bb
sha
+58
~2
symbols
sha256:5226a2cd3cfda21a46c97dfd85eb0ba000f51f6067671bd578c9a0246074289d
snapshot
+58
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
60 symbols
+
test_run_docstring_mentions_duration_ms
method
method test_run_docstring_mentions_duration_ms L313–316
+
test_run_docstring_mentions_exit_code
method
method test_run_docstring_mentions_exit_code L308–311
+
test_duration_ms_present_on_broken_repo
method
method test_duration_ms_present_on_broken_repo L190–194
+
test_exit_code_in_json_is_not_hardcoded_zero
method
method test_exit_code_in_json_is_not_hardcoded_zero L249–254
+
test_exit_code_mirrors_process_exit_on_broken
method
method test_exit_code_mirrors_process_exit_on_broken L244–247
+
test_exit_code_mirrors_process_exit_on_clean
method
method test_exit_code_mirrors_process_exit_on_clean L232–235
+
test_json_exit_code_zero_on_clean_repo
method
method test_json_exit_code_zero_on_clean_repo L216–220
+
test_j_alias_exits_zero_on_clean_repo
method
method test_j_alias_exits_zero_on_clean_repo L129–131
+
test_j_alias_same_exit_code_as_json_flag
method
method test_j_alias_same_exit_code_as_json_flag L156–159
+
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_broken_repo_duration_under_2000ms
method
method test_broken_repo_duration_under_2000ms L358–361
+
test_breakage_output_json_has_duration_ms_annotation
method
method test_breakage_output_json_has_duration_ms_annotation L272–274
+
test_breakage_output_json_has_exit_code_annotation
method
method test_breakage_output_json_has_exit_code_annotation L268–270
+
test_breakage_output_json_retains_errors_annotation
method
method test_breakage_output_json_retains_errors_annotation L280–282
+
test_breakage_output_json_retains_issues_annotation
method
method test_breakage_output_json_retains_issues_annotation L276–278
+
test_breakage_output_json_retains_schema_version_annotation
method
method test_breakage_output_json_retains_schema_version_annotation L288–290
+
test_breakage_output_json_retains_warnings_annotation
method
method test_breakage_output_json_retains_warnings_annotation L284–286
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:62d4abbeadfbdc06aff93b4ad8aa39622aaff6dcc6f6881848d6efb32e3d36bb --body "your comment"
No comments yet. Be the first to start the discussion.