feat: reimagine format-patch + apply-patch as content-addressed, domain-aware, Cohen-labeled Muse patch objects
Replaces the git-style unified diff export with a fully reimagined patch system built for the agent-first era:
- patch_id = sha256(canonical JSON) — any tampering detected before disk write - Cohen action labels on every op: inserted/deleted/modified/moved/renamed - Self-contained .mpatch files embed blobs (base64) for portable transport - applicability block: requires_snapshot, independent_dimensions, conflict_free - elapsed_seconds + exit_code in all JSON output paths - apply-patch: --dry-run, --check, --force; seeds object store from blobs - Full test coverage: unit, integration, data-integrity, security, performance
sha256:6f88cab176942a3760d870b1685b821dd69920040abfae3c002cc71170fe1fcc
sha
+188
~46
−30
symbols
sha256:9005ab95c738a3feb3b337373dc5db278b371a52651785b01ce92a2d05696bd5
snapshot
+188
symbols added
~46
symbols modified
−30
symbols removed
0
dead code introduced
Semantic Changes
264 symbols
+
test_check_exits_zero_when_applicable
method
method test_check_exits_zero_when_applicable L312–321
+
test_deleted_file_removed_after_apply
method
method test_deleted_file_removed_after_apply L245–263
+
test_missing_patch_file_exits_nonzero
method
method test_missing_patch_file_exits_nonzero L369–374
+
test_patch_id_excludes_signature_field
method
method test_patch_id_excludes_signature_field L172–203
+
test_applicability_has_requires_snapshot
method
method test_applicability_has_requires_snapshot L365–398
+
test_deserialize_rejects_missing_patch_id
method
method test_deserialize_rejects_missing_patch_id L282–285
+
test_patch_id_preserved_through_round_trip
method
method test_patch_id_preserved_through_round_trip L272–276
−
test_format_patch_content_has_required_headers
function
function test_format_patch_content_has_required_headers L151–169
−
test_format_patch_content_includes_diff_lines
function
function test_format_patch_content_includes_diff_lines L172–189
−
test_format_patch_empty_repo_exits_nonzero
function
function test_format_patch_empty_repo_exits_nonzero L287–290
−
test_format_patch_file_has_diff_content
function
function test_format_patch_file_has_diff_content L233–242
−
test_format_patch_file_has_muse_commit_id_header
function
function test_format_patch_file_has_muse_commit_id_header L220–230
−
test_format_patch_initial_commit_no_parent
function
function test_format_patch_initial_commit_no_parent L298–309
−
test_format_patch_malicious_subject_safe_filename
function
function test_format_patch_malicious_subject_safe_filename L317–332
−
test_format_patch_single_commit_creates_file
function
function test_format_patch_single_commit_creates_file L197–206
−
test_format_patch_single_commit_numbered_filename
function
function test_format_patch_single_commit_numbered_filename L209–217
−
test_format_patch_stdout_contains_patch_content
function
function test_format_patch_stdout_contains_patch_content L250–257
−
test_make_patch_filename_high_number
function
function test_make_patch_filename_high_number L118–121
−
test_make_patch_filename_max_length
function
function test_make_patch_filename_max_length L139–143
−
test_make_patch_filename_sanitizes_subject
function
function test_make_patch_filename_sanitizes_subject L124–129
−
test_make_patch_filename_strips_control_chars
function
function test_make_patch_filename_strips_control_chars L132–136
+
test_applicability_requires_snapshot_matches_from_snapshot
method
method test_applicability_requires_snapshot_matches_from_snapshot L299–306
+
test_initial_commit_files_in_files_added
method
method test_initial_commit_files_in_files_ L249–253
+
test_applicability_has_independent_dimensions
method
method test_applicability_has_independent_dimensions L228–233
+
test_applicability_has_requires_snapshot
method
method test_applicability_has_requires_snapshot L214–219
+
test_elapsed_seconds_six_decimal_places
method
method test_elapsed_seconds_six_decimal_places L175–180
+
test_mpatch_filename_includes_subject
method
method test_mpatch_filename_includes_subject L397–405
+
test_different_commits_different_patch_ids
method
method test_different_commits_different_patch_ids L429–438
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:6f88cab176942a3760d870b1685b821dd69920040abfae3c002cc71170fe1fcc --body "your comment"
No comments yet. Be the first to start the discussion.