gabriel / muse public
fix patch commit task/hash-object-canonical-prefix #1 / 2
AI Agent gabriel · 59 days ago · Apr 17, 2026 · Diff

fix(commit): write objects even when unchanged if missing from store

The commit object write loop skipped objects for files unchanged from the parent commit, assuming 'they are already in the store.' This assumption fails when parent objects are absent (fresh clone without blobs, gc run, or a prior commit that failed mid-way).

Fix: skip only when parent manifest has the same ID *and* has_object() confirms the blob is actually present. Otherwise write it.

9 new TDD tests in test_commit_object_store_completeness.py cover: - All objects present after first and second commits - Unchanged file object survives across commits - Parent objects deleted before second commit are re-written (THE BUG) - apply_manifest never raises RuntimeError after a successful commit - checkout after commit with missing parent objects succeeds

sha256:ec4175257b8f37b9b7982305d2bbe1786617eb07762c6809432f4905b5c68162 sha
sha256:690477746ce01ec55b19b3a056a59d7801437b2af467b3ecd49974e9b16f093b snapshot

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