feat: muse#53 item 8 — muse symlog grep
Adds `muse symlog grep PATTERN [--file path] [--json]`: searches symbol bodies across their full symlog history for a case-insensitive substring match, answering "when did this symbol last contain the string X?" Reconstructs each entry's body via the existing resolve_symbol_body() and checks it against PATTERN. Scope defaults to every symbol with a journal; narrow with --file.
Covered by tests/test_cmd_symlog_grep.py (6 cases: match in current body, match only in an older version (correctly indexed via newest-first @{N} convention), no match returns empty, case-insensitive matching, --file scoping excludes other files' symbols, missing PATTERN errors). One test iteration note: a comment-only source diff doesn't change a symbol's AST-derived content_id, so no new symlog entry gets written — the "older version" test uses a real statement (a variable assignment) instead of a comment to produce two distinct entries, confirmed via a live muse-dev sandbox before finalizing the test. Confirmed genuine RED by reverting the fix file and re-running (5 of 6 failed; the missing-pattern error case passed incidentally via the pre-existing unrecognized-subcommand fallback), then GREEN with the fix restored plus the full symlog regression suite (239 tests, zero regressions). Live-verified via muse-dev against a disposable /tmp sandbox.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Semantic Changes
27 symbols
Files Changed
+1
~2
1236 in snapshot
0 comments
muse hub commit comment sha256:7beffebf7a5585efe2edc5971d33e032bf723c7dda0d0f890d1cccbca6b08d5a --body "your comment"
No comments yet. Be the first to start the discussion.