feat(contract): supercharge for agent usability
- Add -j alias for --json - Add exit_code (always 0) and duration_ms (non-negative float) to JSON output - Extend _ContractJson TypedDict with exit_code and duration_ms annotations - Update run() docstring with JSON envelope section - Add start_timer() for wall-clock measurement - 35 new TDD tests in test_contract_supercharge.py covering alias, duration_ms, exit_code, TypedDict, docstrings, ANSI sanitization, and performance
sha256:30caff41aacdede679b88f0a6710d5f7a92c6b829c51a466d9d3ce6ed361ce25
sha
+55
~3
symbols
sha256:cbb46e24eb776343ff52159d60b1553c3f3ffb64b20894da7d35138bbf43b4a1
snapshot
+55
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes
58 symbols
+
test_json_output_no_ansi_with_max_commits
method
method test_json_output_no_ansi_with_max_commits L354–361
+
test_run_docstring_mentions_duration_ms
method
method test_run_docstring_mentions_duration_ms L332–335
+
test_run_docstring_mentions_exit_code
method
method test_run_docstring_mentions_exit_code L327–330
+
test_duration_ms_not_zero_for_real_work
method
method test_duration_ms_not_zero_for_real_work L234–238
+
test_exit_code_not_present_in_error_path
method
method test_exit_code_not_present_in_error_path L275–280
+
test_j_alias_same_top_level_keys_as_json_flag
method
method test_j_alias_same_top_level_keys_as_json_flag L183–192
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:30caff41aacdede679b88f0a6710d5f7a92c6b829c51a466d9d3ce6ed361ce25 --body "your comment"
No comments yet. Be the first to start the discussion.