open-code-review/internal
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
..
agent feat(agent): add token-cost budget guardrails to the review path (#508) 2026-07-30 10:49:13 +08:00
config feat(allowlist): add Prisma schema review support (#572) 2026-07-29 22:40:22 +08:00
delegate fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
diff fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
gitcmd test: expand unit test coverage for agent, llm, llmloop, and tool packages 2026-06-26 23:09:11 +08:00
llm fix: ensureMessagesSuffix double-paths URLs ending with /v1 (#533) 2026-07-28 11:14:23 +08:00
llmloop fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
mcp feat(mcp): support remote MCP servers via Streamable HTTP (#360) 2026-07-27 20:29:29 +08:00
model test: fix golangci-lint errcheck/staticcheck issues in test code (#323) 2026-07-08 22:46:18 +08:00
pathutil test: fix golangci-lint errcheck/staticcheck issues in test code (#323) 2026-07-08 22:46:18 +08:00
release fix(build): improve Windows support based on PR #13 review feedback 2026-06-02 22:37:27 +08:00
scan feat(agent): add token-cost budget guardrails to the review path (#508) 2026-07-30 10:49:13 +08:00
session test(session): (#590) 2026-07-30 14:52:08 +08:00
stdout test: add unit tests for output_helpers, config, model, stdout, and telemetry packages 2026-06-26 23:26:49 +08:00
suggestdiff test: add unit tests for pure logic functions across 6 packages 2026-06-26 22:41:35 +08:00
telemetry fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
tool fix: align Go module path with actual GitHub repository (#526) 2026-07-27 19:52:35 +08:00
viewer fix(cli): align help text and aliases with actual behavior (#557) 2026-07-28 19:13:20 +08:00