gabriel / muse public
fix patch muse code cat task/stage-blob-phase-3 #1 / 1
AI Agent gabriel · 119 days ago · May 8, 2026 · Diff

fix(muse code cat): FILE_NOT_TRACKED for untracked files; staged blobs readable from store

Same invariant as Phase 2 (muse cat), now applied to the symbol-level reader. _get_file_bytes in cat.py checks HEAD manifest + stage index before touching disk. Untracked files raise FILE_NOT_TRACKED regardless of disk presence. Staged-but-uncommitted files are readable via their object store blob.

sha256:fab3d7d44d2fc26f5c8e59ed789f4306c92005f9c13cecf3ecaf109730760b68 sha
+20 ~1 symbols
sha256:2cb9ae5700f7242d4337c8aeeedd80b8b31cebc09621290b4d865ff39cf7bcb3 snapshot
+20
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 21 symbols
~ muse/cli/commands/cat.py .py 1 symbol added, 1 symbol modified
+ read_stage import import read_stage L57–57
~ tests/test_cmd_cat.py .py 19 symbols added
+ TestStagedFileReads class class TestStagedFileReads L711–759
+ test_staged_all_mode_readable method method test_staged_all_mode_readable L721–727
+ test_staged_blob_deleted_from_disk_still_readable method method test_staged_blob_deleted_from_disk_still_readable L740–750
+ test_staged_content_matches_blob method method test_staged_content_matches_blob L752–759
+ test_staged_json_schema method method test_staged_json_schema L729–738
+ test_staged_symbol_readable method method test_staged_symbol_readable L714–719
+ TestUntrackedFileErrors class class TestUntrackedFileErrors L672–708
+ test_tracked_file_still_works method method test_tracked_file_still_works L705–708
+ test_untracked_content_not_leaked method method test_untracked_content_not_leaked L698–703
+ test_untracked_on_disk_address_exits_nonzero method method test_untracked_on_disk_address_exits_nonzero L675–680
+ test_untracked_on_disk_all_mode_exits_nonzero method method test_untracked_on_disk_all_mode_exits_nonzero L682–687
+ test_untracked_on_disk_json_error_code method method test_untracked_on_disk_json_error_code L689–696
+ _STAGED_SRC variable variable _STAGED_SRC L662–669
+ _stage_py function function _stage_py L655–659
+ _blob_id import import _blob_id L53–53
+ _long_id import import _long_id L53–53
+ make_entry import import make_entry L54–54
+ write_object import import write_object L52–52
+ write_stage import import write_stage L54–54
← Older Oldest on task/stage-blob-phase-3
All commits
Newer → Latest on task/stage-blob-phase-3

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