feat: muse#53 item 9 — muse symlog show
Adds `muse symlog show "file.py::Symbol@{N}" [--follow] [--json]`: a human-focused convenience view equivalent to `muse code cat "addr@{N}"`, printing a header (commit, author, timestamp, operation) before the full reconstructed symbol body — avoids a second lookup for interactive exploration ("show me what this function looked like two changes ago").
Reuses resolve_symlog_addr() + resolve_symbol_body() exactly like run_resolve() does, with one core addition: SymlogResolution gained an `author: str = ""` field (both of its two construction sites in resolve_symlog_addr() now populate it from the underlying entry) since the existing resolution type didn't expose it and `show`'s header needs it. Purely additive on a frozen dataclass with a default, so the two existing call sites needed no changes.
Covered by tests/test_cmd_symlog_show.py (6 cases: body+metadata returned correctly, older index returns older body content, missing symbol errors, out-of-range index errors, invalid ref form (missing @{N}) errors, text-mode prints header and body). Confirmed genuine RED by reverting both changed files and re-running (3 of 6 failed — the success-path cases — while the 3 error-path cases passed incidentally via the pre-existing unrecognized-subcommand fallback), then GREEN with the fix restored plus the full symlog regression suite (222 tests across stat/read/lifecycle/refs/core/commit-integration, zero regressions). Live-verified via muse-dev against a disposable /tmp sandbox (older and newer index both reconstructed the correct body text, text and --json modes both checked).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Semantic Changes
28 symbols
Files Changed
+1
~3
1233 in snapshot
0 comments
muse hub commit comment sha256:d094fde565da48ec3c284d1be24d39c85f9b3b57dc25f9e66773128aabf7b063 --body "your comment"
No comments yet. Be the first to start the discussion.