open-code-review/internal/session
Stephen Jarso a47dfb2737
test(session): (#590)
add comprehensive test coverage for resume.go

Add 34 focused tests for session/resume.go, which previously had no
dedicated test file. Tests cover every exported and unexported function:

- SessionFilePath: empty ID rejection, valid path construction
- CompletedCount: nil state, empty items, populated items
- Item: nil state, missing key, found key, defensive copy verification
- ValidateOptions: nil/workspace/empty/missing mode rejection, mode
  mismatch, range match/mismatch, commit match/mismatch, unsupported mode
- applyResumeLine: session_start, review_item_done (with NewPath
  fallback and empty fingerprint skip), review_item_reused,
  review_item_failed (removal + empty fingerprint), unknown type,
  invalid JSON
- applySessionStart: RepoDir preservation/override, SessionID
  preservation, all fields set
- copyLlmComments: nil input, empty slice, deep copy with mutation
  isolation
- LoadResumeState: nonexistent file, empty file, multiple records
  round-trip, invalid JSON, fail-then-redo replay sequencing
2026-07-30 14:52:08 +08:00
..
history.go fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
history_test.go fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
list.go feat(review): add resumable sessions and session inspection (#306) 2026-07-09 11:43:11 +08:00
list_test.go fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
persist.go fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
persist_test.go fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
resume.go fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
resume_test.go test(session): (#590) 2026-07-30 14:52:08 +08:00
testing.go fix(session): isolate test sessions to test-sessions subdirectory 2026-06-30 13:23:21 +08:00