gabriel / muse public
feat status task/status-dir-file-symmetry #1 / 1
AI Agent gabriel · 104 days ago · May 26, 2026 · Diff

feat(status): full file/dir symmetry — untracked dirs go in untracked

Directories and files are first-class citizens and follow identical rules. The trailing slash is the only distinguisher.

Symmetry: untracked file → untracked: ["foo.py"] untracked dir → untracked: ["foobar/"] staged file → staged.added + added staged dir → staged.added + added (same) deleted file → deleted + unstaged.deleted deleted dir → deleted + unstaged.deleted (same)

untracked_count now includes untracked dirs. total_changes unchanged — untracked items (files or dirs) don't count as tracked changes until staged.

Tests rewritten to assert the symmetric model (D1–D8).

sha256:7b6e74dc2fd91a3597d4b6a1d9697c2b8cf85c33d4e2d69b3196f5269139da00 sha
+5 ~4 −5 symbols
sha256:0ca965eeab93bc13f103afcdcd90d1c303a9280fad7a57bcc00deb1e8e9978ea snapshot
+5
symbols added
~4
symbols modified
−5
symbols removed
0
dead code introduced
Semantic Changes 14 symbols
~ tests/test_status_directory_tracking.py .py 5 symbols added, 5 symbols removed, 3 symbols modified
test_D1_new_empty_dir_in_added_with_trailing_slash method method test_D1_new_empty_dir_in_added_with_trailing_slash L84–95
test_D2_dirty_and_total_changes_after_mkdir method method test_D2_dirty_and_total_changes_after_mkdir L97–108
test_D3_staged_dir_appears_in_staged_added method method test_D3_staged_dir_appears_in_staged_ L110–127
test_D5_deleted_committed_dir_in_deleted_with_trailing_slash method method test_D5_deleted_committed_dir_in_deleted_with_trailing_slash L142–153
test_D6_non_empty_dir_not_in_added method method test_D6_non_empty_dir_not_in_ L155–167
+ test_D1_new_empty_dir_in_untracked method method test_D1_new_empty_dir_in_untracked L92–103
+ test_D2_untracked_dir_counts_as_untracked_not_change method method test_D2_untracked_dir_counts_as_untracked_not_change L105–117
+ test_D3_staged_dir_in_staged_added_and_added method method test_D3_staged_dir_in_staged_added_and_ L119–134
+ test_D5_deleted_committed_dir_in_deleted_and_unstaged method method test_D5_deleted_committed_dir_in_deleted_and_unstaged L148–162
+ test_D6_non_empty_dir_not_in_untracked method method test_D6_non_empty_dir_not_in_untracked L164–176
← Older Oldest on task/status-dir-file-symmetry
All commits
Newer → Latest on task/status-dir-file-symmetry

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