gabriel / muse public
fix BREAKING task/commit-id-v2 #2 / 2
AI Agent gabriel · 149 days ago · Apr 24, 2026 · Diff

fix: apply_manifest only deletes tracked files; _walk_tree stages dotfiles

Two data-safety bugs fixed:

1. apply_manifest(root, prev_manifest, target_manifest) — new 3-arg signature. Deletion candidates come from prev_manifest.keys() instead of walk_workdir(), so untracked files (Write tool docs, local scripts) are never deleted.

2. _walk_tree in code_stage.py — removed dotfile skip. muse code add . now stages .museattributes, .museignore, and other dotfiles just as git add . stages .gitattributes and .gitignore.

All callers updated. 196 tests pass.

sha256:55a8bbec0d35d504592b28a75462e1010cfed70023c31283d5057e577347cd8f sha
+11 ~57 −2 symbols
sha256:acdbb52fcb78d43ef8dc7380c61e8e21613d35603481cb6ce620617893afd404 snapshot
+11
symbols added
~57
symbols modified
−2
symbols removed
0
dead code introduced
Semantic Changes 70 symbols
~ muse/cli/commands/cherry_pick.py .py 1 symbol modified
~ run
~ muse/cli/commands/code_stage.py .py 1 symbol modified
~ muse/cli/commands/commit.py .py 1 symbol modified
~ run
~ muse/cli/commands/merge.py .py 2 symbols modified
~ muse/cli/commands/reset.py .py 1 symbol added, 6 symbols modified
~ muse/core/rebase.py .py 1 symbol modified
~ muse/core/workdir.py .py 1 symbol modified
~ tests/test_code_stage.py .py 2 symbols added
+ test_add_dot_stages_museattributes function function test_add_dot_stages_museattributes L739–755
+ test_add_dot_stages_museignore function function test_add_dot_stages_museignore L758–774
~ tests/test_merge_data_integrity.py .py 1 symbol added, 1 symbol removed, 6 symbols modified
~ tests/test_workdir_integrity.py .py 6 symbols added, 1 symbol removed, 15 symbols modified
test_II7_empty_manifest_non_empty_workdir_raises_value_error method method test_II7_empty_manifest_non_empty_workdir_raises_value_error L363–370
+ test_II7_empty_manifest_non_empty_prev_raises_value_error method method test_II7_empty_manifest_non_empty_prev_raises_value_error L368–375
+ TestApplyManifestUntrackedFilesIX class class TestApplyManifestUntrackedFilesIX L1117–1206
+ test_IX1_untracked_file_not_deleted_by_apply_manifest method method test_IX1_untracked_file_not_deleted_by_apply_manifest L1126–1146
+ test_IX2_untracked_dotfile_not_deleted method method test_IX2_untracked_dotfile_not_deleted L1148–1164
+ test_IX3_tracked_file_removed_from_target_gets_deleted method method test_IX3_tracked_file_removed_from_target_gets_deleted L1166–1178
+ test_IX4_commit_does_not_delete_untracked_file method method test_IX4_commit_does_not_delete_untracked_file L1180–1206

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