gabriel / muse public
feat patch task/patch-id #1 / 1
gabriel · 62 days ago · Apr 14, 2026 · Diff

feat: implement muse patch-id — content-based commit identity

- _compute_patch_id: SHA-256 of sorted-file unified diff content lines (+/- only, no @@ or file headers); --stable strips trailing whitespace so cosmetic differences don't produce new patch-ids - _resolve_commit: resolves HEAD, branch names, and commit IDs to CommitRecord - run: resolves commit → loads parent manifest → computes patch-id → text output '<patch_id> <commit_id>' or JSON with subject line - ANSI/control-char rejection in ref argument - 16 tests: unit (same diff = same id, different = different, whitespace normalization, deterministic empty diff), integration (JSON schema, text format, specific commit, branch ref, error cases), security (ANSI rejected), stress (10 distinct diffs produce 10 distinct patch-ids)

sha256:df9844bc6776600449ef2e14666547d4c1ff1f8fcf0e2d4b2543a6bf13fafae3 sha
sha256:5e3e3fa66b1e16a6e86b9ac88be71e30ab2ac739ff0945537d8adcf26bf4742a snapshot
← Older Oldest on task/patch-id
All commits
Newer → Latest on task/patch-id

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