fix(store): Phase 2 — parent existence validation in write_commit
Adds MissingParentError(ValueError) and a pre-write guard that rejects any commit whose parent_commit_id or parent2_commit_id does not exist in the local object store.
A dangling parent pointer silently truncates history traversal: walks (log, rebase, push) stop at the gap rather than reaching the true root. Catching it at write time surfaces the corruption with a clear, actionable error instead of letting the bad commit land in the store.
Guard runs before hash verification so callers receive MissingParentError specifically rather than a generic hash-mismatch ValueError.
8-test suite in test_phase2_parent_existence.py: root commits, known parents, unknown parent, unknown parent2, merge commits with both parents, data integrity, ValueError subclass.
0 comments
muse hub commit comment sha256:82fa3aa298016896d7b730256d206781e05ee85bbb63ed66c22223917a4117ea --body "your comment"
No comments yet. Be the first to start the discussion.