gabriel / muse public
feat patch diff task/supercharge-diff #2 / 2
AI Agent gabriel · 143 days ago · Apr 17, 2026 · Diff

feat(diff): supercharge --json; fix sha256: prefix in _write_object; add merge bug regression tests

sha256:c12902dd8bf2773e00d2143540f78dc8d769070a611a0cb04ee38502289d70ae sha
+92 ~5 symbols
sha256:df80a1e5b8b1d62a3880e077a0b6f5cf65d1ac21da1d0880465408908c17374b snapshot
+92
symbols added
~5
symbols modified
0
dead code introduced
Semantic Changes 97 symbols
~ tests/test_cmd_diff_hardening.py .py 77 symbols added
+ TestCommitIdFormat class class TestCommitIdFormat L420–447
+ test_both_commit_ids_present_for_two_commit_diff method method test_both_commit_ids_present_for_two_commit_diff L438–447
+ test_from_commit_id_full_length method method test_from_commit_id_full_length L427–431
+ test_from_commit_id_has_sha256_prefix method method test_from_commit_id_has_sha256_prefix L422–425
+ test_to_commit_id_null_for_workdir method method test_to_commit_id_null_for_workdir L433–436
+ TestElapsedSeconds class class TestElapsedSeconds L145–176
+ test_is_float method method test_is_float L147–149
+ test_non_negative method method test_non_negative L151–153
+ test_present_on_dirty_tree method method test_present_on_dirty_tree L159–162
+ test_present_on_staged method method test_present_on_staged L164–170
+ test_six_decimal_precision method method test_six_decimal_precision L172–176
+ test_under_ten_seconds method method test_under_ten_seconds L155–157
+ TestHelp class class TestHelp L455–471
+ test_help_exits_0 method method test_help_exits_0 L457–459
+ test_help_mentions_exit_code method method test_help_mentions_exit_code L469–471
+ test_help_mentions_json method method test_help_mentions_json L461–463
+ test_help_mentions_staged method method test_help_mentions_staged L465–467
+ TestJsonSchemaComplete class class TestJsonSchemaComplete L74–137
+ test_all_fields_clean_tree method method test_all_fields_clean_tree L77–84
+ test_all_fields_dirty_tree method method test_all_fields_dirty_tree L86–92
+ test_all_fields_staged method method test_all_fields_staged L105–112
+ test_all_fields_two_commit method method test_all_fields_two_commit L94–103
+ test_all_fields_unstaged method method test_all_fields_unstaged L114–122
+ test_exit_code_field_zero method method test_exit_code_field_zero L124–127
+ test_exit_code_field_zero_with_changes method method test_exit_code_field_zero_with_changes L129–133
+ test_json_is_compact method method test_json_is_compact L135–137
+ TestRenamedField class class TestRenamedField L402–412
+ test_renamed_empty_on_clean method method test_renamed_empty_on_clean L409–412
+ test_renamed_is_dict method method test_renamed_is_dict L404–407
+ TestSemVerFields class class TestSemVerFields L368–394
+ test_breaking_changes_empty_on_clean method method test_breaking_changes_empty_on_clean L391–394
+ test_breaking_changes_is_list method method test_breaking_changes_is_list L386–389
+ test_breaking_changes_present method method test_breaking_changes_present L381–384
+ test_sem_ver_bump_null_on_clean method method test_sem_ver_bump_null_on_clean L375–379
+ test_sem_ver_bump_present method method test_sem_ver_bump_present L370–373
+ TestStagedIntegration class class TestStagedIntegration L225–281
+ test_staged_exit_code_clean method method test_staged_exit_code_clean L279–281
+ test_staged_exit_code_flag method method test_staged_exit_code_flag L273–277
+ test_staged_json_clean_when_nothing_staged method method test_staged_json_clean_when_nothing_staged L236–242
+ test_staged_json_from_ref_is_head method method test_staged_json_from_ref_is_head L244–249
+ test_staged_json_shows_staged_file method method test_staged_json_shows_staged_file L227–234
+ test_staged_json_to_ref_is_staged method method test_staged_json_to_ref_is_staged L251–256
+ test_staged_new_file method method test_staged_new_file L258–264
+ test_staged_stat_output method method test_staged_stat_output L266–271
+ TestStressElapsed class class TestStressElapsed L479–523
+ test_200_file_diff_under_5s method method test_200_file_diff_under_5s L481–504
+ test_elapsed_seconds_reflects_real_work method method test_elapsed_seconds_reflects_real_work L506–523
+ TestSummaryField class class TestSummaryField L184–217
+ test_summary_contains_change_count method method test_summary_contains_change_count L204–209
+ test_summary_empty_string_on_clean method method test_summary_empty_string_on_clean L190–195
+ test_summary_is_string method method test_summary_is_string L186–188
+ test_summary_matches_total_changes method method test_summary_matches_total_changes L211–217
+ test_summary_non_empty_when_dirty method method test_summary_non_empty_when_dirty L197–202
+ TestSymbolsField class class TestSymbolsField L326–360
+ test_symbols_empty_on_clean method method test_symbols_empty_on_clean L333–337
+ test_symbols_is_dict method method test_symbols_is_dict L328–331
+ test_symbols_keys_are_file_paths method method test_symbols_keys_are_file_paths L346–351
+ test_symbols_present_on_dirty method method test_symbols_present_on_dirty L339–344
+ test_symbols_values_have_buckets method method test_symbols_values_have_buckets L353–360
+ TestUnstagedIntegration class class TestUnstagedIntegration L289–318
+ test_unstaged_clean_when_all_staged method method test_unstaged_clean_when_all_staged L300–306
+ test_unstaged_exit_code_when_dirty method method test_unstaged_exit_code_when_dirty L313–318
+ test_unstaged_json_has_elapsed method method test_unstaged_json_has_elapsed L308–311
+ test_unstaged_json_shows_unstaged_only method method test_unstaged_json_shows_unstaged_only L291–298
+ _commit function function _commit L48–49
+ _diff function function _diff L44–45
+ _invoke function function _invoke L35–41
+ _stage function function _stage L52–53
+ CliRunner import import CliRunner L25–25
+ InvokeResult import import InvokeResult L25–25
+ annotations import import annotations L17–17
+ json import import json L19–19
+ os import import os L20–20
+ pathlib import import pathlib L21–21
+ pytest import import pytest L23–23
+ repo function function repo L57–66
+ runner variable variable runner L27–27
~ muse/cli/commands/diff.py .py 1 symbol added, 2 symbols modified
+ time import import time L52–52
~ run
~ tests/test_cmd_merge.py .py 5 symbols added, 1 symbol modified
+ TestMergeCommitCompletion class class TestMergeCommitCompletion L351–398
+ test_commit_after_conflict_resolution_passes_hash_verification method method test_commit_after_conflict_resolution_passes_hash_verification L353–398
+ TestOneSidedChangeNeverConflicts class class TestOneSidedChangeNeverConflicts L286–339
+ test_both_sides_change_different_files_clean_merge method method test_both_sides_change_different_files_clean_merge L316–339
+ test_theirs_only_changes_file_clean_merge method method test_theirs_only_changes_file_clean_merge L288–314
~ tests/test_core_merge_engine.py .py 9 symbols added
+ TestMergeCommitHashVerification class class TestMergeCommitHashVerification L566–596
+ test_merge_commit_id_is_deterministic method method test_merge_commit_id_is_deterministic L575–583
+ test_two_parent_commit_passes_verification method method test_two_parent_commit_passes_verification L569–573
+ test_verify_sees_same_id_as_compute method method test_verify_sees_same_id_as_compute L585–596
+ TestOneSidedChangeNeverConflicts class class TestOneSidedChangeNeverConflicts L510–554
+ test_merge_ops_one_sided_no_conflict method method test_merge_ops_one_sided_no_conflict L540–554
+ test_only_ours_changed_no_conflict method method test_only_ours_changed_no_conflict L523–530
+ test_only_theirs_changed_no_conflict method method test_only_theirs_changed_no_conflict L513–521
+ test_theirs_deleted_file_ours_untouched method method test_theirs_deleted_file_ours_untouched L532–538

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:c12902dd8bf2773e00d2143540f78dc8d769070a611a0cb04ee38502289d70ae --body "your comment"