gabriel / muse public
fix patch task/muse-61-symlog-long-filename #1 / 1
AI Agent gabriel · 3 hours ago · Sep 22, 2026 · Diff

fix: symlog long/multi-byte symbol names no longer silently dropped (muse#61)

Symbol names whose percent-encoded form exceeded the OS filename limit (255 bytes) raised OSError inside append_symlog, which callers in commit.py swallowed silently — the journal entry was just lost with no visible error. Names over 200 encoded bytes now fall back to a hashed leaf name (marker-prefixed with '!', which percent-encoding can never produce), with a small per-directory sidecar index (.leaf_index.json) mapping the hash back to the original symbol name for list_symlog_symbols and list_symlog_symbols_for_file to resolve on read.

sha256:d08abfdaa26df2e781fa4b7aae0ebe64cfdc41a3d8df3d38bcac09cd3c7aab85 sha
+18 ~7 symbols
3 changed · 1206 in snapshot files
sha256:ee65aee72f8cc8586677371e34dc6b28b1598b767110bd4bb45aabcfd2c6bc00 snapshot
+18
symbols added
~7
symbols modified
3
files changed
1206
files in snapshot
0
dead code introduced
Semantic Changes 25 symbols
~ muse/core/symlog.py .py 9 symbols added, 5 symbols modified
+ _HASHED_LEAF_PREFIX variable variable _HASHED_LEAF_PREFIX L120–120
+ _LEAF_INDEX_FILENAME variable variable _LEAF_INDEX_FILENAME L125–125
+ _MAX_LEAF_BYTES variable variable _MAX_LEAF_BYTES L113–113
+ _hashed_leaf_name function function _hashed_leaf_name L150–153
+ _leaf_index_path function function _leaf_index_path L156–158
+ _record_hashed_leaf function function _record_hashed_leaf L161–181
+ _resolve_hashed_leaf function function _resolve_hashed_leaf L184–194
+ hashlib import import hashlib L79–79
+ json import import json L80–80
~ pyproject.toml .toml 2 symbols modified
~ tests/test_core_symlog.py .py 9 symbols added
+ TestLongSymbolNameFilenameLimit class class TestLongSymbolNameFilenameLimit L192–295
+ test_boundary_at_255_bytes_encoded method method test_boundary_at_255_bytes_encoded L276–289
+ test_long_name_does_not_raise_on_append method method test_long_name_does_not_raise_on_append L210–218
+ test_long_name_history_readable_via_read_symlog method method test_long_name_history_readable_via_read_symlog L242–254
+ test_long_name_produces_filename_within_os_limit method method test_long_name_produces_filename_within_os_limit L203–208
+ test_long_name_round_trips_via_list_symlog_symbols method method test_long_name_round_trips_via_list_symlog_symbols L220–228
+ test_long_name_round_trips_via_list_symlog_symbols_for_file method method test_long_name_round_trips_via_list_symlog_symbols_for_file L230–240
+ test_short_name_unaffected_by_long_name_fix method method test_short_name_unaffected_by_long_name_fix L291–295
+ test_two_different_long_names_do_not_collide method method test_two_different_long_names_do_not_collide L256–274
Files Changed
~3
1206 in snapshot
← Older Oldest on task/muse-61-symlog-long-filename
All commits
Newer → Latest on task/muse-61-symlog-long-filename

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