Add comprehensive unit tests for the compact package: - haiku.go: Mock API tests for SummarizeTier1, retry logic tests for callWithRetry (429/500 handling, exhaust retries, context timeout), expanded isRetryable tests for network timeouts and API error codes - git.go: Tests for GetCurrentCommitHash in various git states (in repo, outside repo, new repo, empty repo) - compactor.go: Unit tests for New(), CompactTier1(), CompactTier1Batch() with mock API server, config validation, error paths Small production change: NewHaikuClient now accepts variadic options for testing (option.WithBaseURL, option.WithMaxRetries). Coverage: 17.3% → 81.8% 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4.2 KiB
4.2 KiB