M2.2: marchwarden replay CLI command #12

Merged
archeious merged 1 commit from feat/cli-replay into main 2026-04-08 20:59:13 +00:00
Collaborator

Closes Issue #9

Summary

  • New marchwarden replay <trace_id> subcommand
  • Resolves trace file at ~/.marchwarden/traces/<trace_id>.jsonl (matches TraceLogger default); --trace-dir overrides
  • Streams JSONL, renders each step as a rich table row: step #, action, decision, extra fields, content_hash
  • Friendly errors for missing trace_id and malformed JSON lines (exit 1)

Tests

  • test_replay_renders_trace — fixture JSONL, asserts every step + content_hash + extras render
  • test_replay_unknown_trace_id — exit 1 + clear message
  • test_replay_invalid_json — exit 1 + clear message
  • test_render_trace_empty — empty trace path
  • 88/88 passing
Closes Issue #9 ## Summary - New `marchwarden replay <trace_id>` subcommand - Resolves trace file at `~/.marchwarden/traces/<trace_id>.jsonl` (matches TraceLogger default); `--trace-dir` overrides - Streams JSONL, renders each step as a rich table row: step #, action, decision, extra fields, content_hash - Friendly errors for missing trace_id and malformed JSON lines (exit 1) ## Tests - `test_replay_renders_trace` — fixture JSONL, asserts every step + content_hash + extras render - `test_replay_unknown_trace_id` — exit 1 + clear message - `test_replay_invalid_json` — exit 1 + clear message - `test_render_trace_empty` — empty trace path - 88/88 passing
claude-code added 1 commit 2026-04-08 20:57:46 +00:00
Adds `marchwarden replay <trace_id>` to pretty-print a prior research
run from its JSONL trace file. Resolves the trace under
~/.marchwarden/traces/ by default; --trace-dir overrides for tests and
custom locations. Renders each step as a row with action, decision,
extra fields, and content_hash. Friendly errors for unknown trace_id
and malformed JSON lines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
archeious approved these changes 2026-04-08 20:59:07 +00:00
archeious merged commit bca7294ec8 into main 2026-04-08 20:59:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: archeious/marchwarden#12
No description provided.