feat(tests): Add comprehensive integration tests for critical paths
Implements Task 3 from PLAN_REMAINING.md with 37 integration tests covering:
Test Coverage:
- Blob download with CDN→PDS fallback (4 tests)
- Cache operations: hit/miss/TTL/disabled (8 tests)
- Moderation retry logic & circuit breaker (10 tests)
- Worker job processing flow (15 tests)
Key Features:
- Mock HTTP servers (mockito) for external API testing
- Redis integration tests with availability checks
- Circuit breaker state transition testing
- Rate limiter enforcement verification
- Phash computation & matching validation
- Comprehensive error scenario coverage
Test Results:
- 36 passing tests
- 1 ignored (TTL expiration - requires 3s wait)
- All tests deterministic and isolated
- Average runtime: <5s
Dependencies:
- Added jacquard, jacquard-api, jacquard-common to fix broken imports
- Fixed Cargo.toml after switch from local paths to published crates
Test Organization:
- tests/integration_tests.rs - Entry point
- tests/integration/helpers.rs - Test fixtures & mocks
- tests/integration/blob_download_test.rs - Download fallback tests
- tests/integration/cache_test.rs - Redis cache tests
- tests/integration/moderation_test.rs - Retry & circuit breaker tests
- tests/integration/worker_test.rs - Job processing tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>