feat(cat): global snapshot fallback when symbol not in specified file
When `muse code cat FILE::SYMBOL` fails because SYMBOL is not in FILE, scan all other tracked files in the snapshot before erroring:
- If found in exactly one file: auto-cat from its real location, print a note line '# note: X not in Y — found in Z', exit 0 - If found in multiple files: report ambiguity, exit 1 - If not found anywhere: original error with improved hint including `muse code grep` suggestion, exit 1
This eliminates the agent ergonomic failure where specifying the wrong file (e.g. the importing module instead of the defining module) causes a hard exit that aborts parallel bash calls.
sha256:21830f6a0d9afabb6c70083fadec9c3c8d3a8ade264e6d203df331db30282249
sha
+4
~2
symbols
sha256:600d16855d0250b7a1192df322079623e7a74d348a28d5ad501e10c1981cdd91
snapshot
+4
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
6 symbols
~
run
+
test_cat_truly_missing_symbol_still_errors
method
method test_cat_truly_missing_symbol_still_errors L1707–1710
+
test_cat_wrong_file_fallback_ambiguous_exits_nonzero
method
method test_cat_wrong_file_fallback_ambiguous_exits_nonzero L1693–1705
+
test_cat_wrong_file_fallback_finds_symbol
method
method test_cat_wrong_file_fallback_finds_symbol L1657–1674
~
TestCat
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:21830f6a0d9afabb6c70083fadec9c3c8d3a8ade264e6d203df331db30282249 --body "your comment"
No comments yet. Be the first to start the discussion.