gabriel / muse public
fix patch pack dev
AI Agent gabriel · 46 days ago · Apr 27, 2026 · Diff

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.

sha256:2244e33366cb0702264c6d4de441f5dc343a3ab18b56c34a1889a8a0785258bb sha
sha256:9c3e42d1bf2a878b47c6ca546a45bfbcce91779b316ba20df43827facb292566 snapshot
← Older Oldest on dev
All commits
Newer → Latest on dev

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