feat(init): supercharge JSON output with typed schema, warnings, timing, and error helpers
- Add _InitJson and _InitErrorJson TypedDicts matching documented schema - Add status/error/warnings/exit_code fields to all JSON responses - Add duration_ms (float, milliseconds) and created_at (ISO 8601 UTC) to success output - Add _emit_error() helper centralising error JSON emission and SystemExit - Thread warnings list through _copy_template() for symlink/muse-dir skip notices - Update module docstring to document both success and error JSON schemas - Fix existing TestCopyTemplate tests to pass warnings list argument - Add 50 new tests in test_init_supercharge.py covering schema shape, types, exit codes, warnings, duration, created_at, TypedDict annotations, docstring
sha256:1614412b25e147598b21f12d44c4530620388e4b000b38313051c3ca1ead2f3d
sha
+77
~14
symbols
sha256:c389caed134997c8f7454bf5a414c5afa51960b555653819c05e63c26ebf86c7
snapshot
+77
symbols added
~14
symbols modified
0
dead code introduced
Semantic Changes
91 symbols
+
test_docstring_documents_created_at_field
method
method test_docstring_documents_created_at_field L481–485
+
test_docstring_documents_duration_ms_field
method
method test_docstring_documents_duration_ms_field L475–479
+
test_docstring_documents_error_schema
method
method test_docstring_documents_error_schema L487–491
+
test_docstring_documents_exit_code_field
method
method test_docstring_documents_exit_code_field L463–467
+
test_docstring_documents_status_field
method
method test_docstring_documents_status_field L457–461
+
test_docstring_documents_warnings_field
method
method test_docstring_documents_warnings_field L469–473
+
test_nonexistent_template_error_shape
method
method test_nonexistent_template_error_shape L230–233
+
test_exit_code_matches_process_exit_code
method
method test_exit_code_matches_process_exit_code L263–270
+
test_init_error_json_typed_dict_exists
method
method test_init_error_json_typed_dict_exists L421–425
+
test_all_required_keys_present_on_bare_init
method
method test_all_required_keys_present_on_bare_init L115–120
+
test_all_required_keys_present_on_fresh_init
method
method test_all_required_keys_present_on_fresh_init L99–104
+
test_all_required_keys_present_on_reinit
method
method test_all_required_keys_present_on_reinit L106–113
+
test_status_error_on_existing_no_force
method
method test_status_error_on_existing_no_force L177–181
+
test_multiple_symlinks_produce_multiple_warnings
method
method test_multiple_symlinks_produce_multiple_warnings L331–341
+
test_warnings_empty_on_reinit_no_template
method
method test_warnings_empty_on_reinit_no_template L287–293
+
test_warnings_list_always_list_not_null
method
method test_warnings_list_always_list_not_null L323–329
+
test_warnings_populated_when_template_has_muse_dir
method
method test_warnings_populated_when_template_has_muse_dir L309–321
+
test_warnings_populated_when_template_has_symlinks
method
method test_warnings_populated_when_template_has_symlinks L295–307
~
run
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:1614412b25e147598b21f12d44c4530620388e4b000b38313051c3ca1ead2f3d --body "your comment"
No comments yet. Be the first to start the discussion.