Parser-level tests live in internal/harness/claude/transcript_test.go (the claude jsonl format is owned by the harness impl). The tests here exercise the cmdTranscript wiring: ref resolution, the "no session" gate, the happy-path dispatch into the harness, and the retrospective-bind full-render guar
(t *testing.T)
| 17 | // retrospective-bind full-render guarantee. |
| 18 | |
| 19 | func TestTranscriptCmdNoSession(t *testing.T) { |
| 20 | tmp := t.TempDir() |
| 21 | t.Setenv("FLOW_ROOT", filepath.Join(tmp, "flow")) |
| 22 | t.Setenv("HOME", tmp) |
| 23 | |
| 24 | oldOsa := iterm.Runner |
| 25 | iterm.Runner = func(args []string) error { return nil } |
| 26 | t.Cleanup(func() { iterm.Runner = oldOsa }) |
| 27 | |
| 28 | cmdInit(nil) |
| 29 | cmdAdd([]string{"task", "No Session Task", "--slug", "no-session"}) |
| 30 | |
| 31 | rc := cmdTranscript([]string{"no-session"}) |
| 32 | if rc != 1 { |
| 33 | t.Errorf("transcript with no session: rc=%d, want 1", rc) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func TestTranscriptCmdWithSession(t *testing.T) { |
| 38 | tmp := t.TempDir() |
nothing calls this directly
no test coverage detected