gabriel / muse public
feat BREAKING markdown dev #96 / 100
AI Agent gabriel · 102 days ago · May 26, 2026 · Diff

feat(markdown): stable block/table symbol names — @L{n} only on collision

Single code blocks and tables within a scope get clean names (code[lang], table) with no line-number suffix. @L{n} is appended only when two or more blocks share the same language/kind within the same parent scope. This makes symbol addresses stable across line shifts when content is unique.

Also: workdir_snapshot() now tracks all on-disk directories, not only those containing .musekeep sentinels, eliminating false deleted dirs in diffs.

sha256:cac804bb5b96801930d9f9d66b01e7b4543c0332513b03c2ddab18e13e19c6b5 sha
+13 ~19 symbols
sha256:626efb4d96e7fc2265b8f8fb3e318c615ca825cb8e59f0b5712e42be0a8f00d3 snapshot
+13
symbols added
~19
symbols modified
0
dead code introduced
Semantic Changes 32 symbols
~ muse/plugins/code/ast_parser.py .py 2 symbols added, 2 symbols modified
+ _BLOCK_LINE_RE variable variable _BLOCK_LINE_RE L581–581
+ _promote_unique_blocks function function _promote_unique_blocks L584–643
~ tests/test_markdown_adapter.py .py 11 symbols added, 15 symbols modified
+ TestBlockNamingStability class class TestBlockNamingStability L754–880
+ test_MB10_different_langs_in_same_section_each_clean method method test_MB10_different_langs_in_same_section_each_clean L865–880
+ test_MB1_single_code_block_no_line_number method method test_MB1_single_code_block_no_line_number L755–763
+ test_MB2_two_same_lang_blocks_both_get_line_number method method test_MB2_two_same_lang_blocks_both_get_line_number L765–777
+ test_MB3_three_same_lang_blocks_all_get_line_number method method test_MB3_three_same_lang_blocks_all_get_line_number L779–790
+ test_MB4_single_code_block_at_root_no_line_number method method test_MB4_single_code_block_at_root_no_line_number L792–800
+ test_MB5_same_lang_in_different_sections_each_clean method method test_MB5_same_lang_in_different_sections_each_clean L802–813
+ test_MB6_single_table_no_line_number method method test_MB6_single_table_no_line_number L815–826
+ test_MB7_two_tables_in_same_section_both_get_line_number method method test_MB7_two_tables_in_same_section_both_get_line_number L828–840
+ test_MB8_moving_block_address_stable method method test_MB8_moving_block_address_stable L842–852
+ test_MB9_no_language_single_block_no_line_number method method test_MB9_no_language_single_block_no_line_number L854–863

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