fix(pack): Phase 7 — topological commit retry in apply_mpack
Bundles may arrive with commits in BFS order (newest-first). Phase 2's MissingParentError guard correctly rejects a commit whose parent hasn't been written yet, but apply_mpack was iterating commits in the received order without retrying deferred commits.
Fix: parse all commits first, then write in a retry loop. Each pass defers commits that raise MissingParentError. If a full pass makes no progress (the parent isn't in the bundle or the local store), log and skip rather than crashing apply_mpack.
Also imports MissingParentError from store into pack.py so the retry loop can distinguish dangling-parent rejections from other errors.
4-test suite in test_phase7_bundle_atomicity.py: newest-first ordering succeeds (3 commits), correct order still works, absent parent skipped gracefully, commits readable before ref advance.
0 comments
muse hub commit comment sha256:2244e33366cb0702264c6d4de441f5dc343a3ab18b56c34a1889a8a0785258bb --body "your comment"
No comments yet. Be the first to start the discussion.