gabriel / muse public
fix task/fix-shelf-pop-stale-disk #1 / 1
AI Agent gabriel · 38 days ago · May 4, 2026 · Diff

fix: shelf pop compares disk bytes not HEAD manifest for already_current check

_apply_shelf_snapshot was comparing the shelf object_id against head_manifest[path], which caused pop to skip writing files to disk whenever HEAD had advanced to the same content as the shelf (e.g. via a merge) even though the on-disk bytes were still stale.

Fix: hash the actual on-disk file content and compare that against the shelf object_id. already_current now means the working tree already has the right bytes, not just that HEAD has them.

Also fixes test_mixed_restored_and_already_current which was asserting the buggy behaviour (no disk file, but head_manifest match counted as already_current).

sha256:4bb6dd29ddf67267e162e7bfbbc91c1c2dd3d8075342b60d7516954a86e5e7b1 sha
sha256:388113085c65d24bce11c125af3dd59023120fa0f0e3f4ec4930e66857a97f1b snapshot
← Older Oldest on task/fix-shelf-pop-stale-disk
All commits
Newer → Latest on task/fix-shelf-pop-stale-disk

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