- Add comprehensive test suite in test_semantic_robustness.py
- TestLLMFailureFallback: LLM调用失败自动降级 (ROBUST-01)
- TestNonRecoverableErrorDetection: 不可恢复错误检测
- TestRecoverableErrorDetection: 可恢复错误检测
- TestRetryMechanism: 重试机制测试
- TestFallbackToRuleBased: 降级到规则分段 (ROBUST-03)
- TestLoggingBehavior: 日志记录行为 (ROBUST-04)
- TestParseFailureRetry: 解析失败重试 (ROBUST-02)
- TestExtractJSON: JSON提取功能
- Update conftest.py with Phase 14 fixtures:
- Mock AI clients for different failure scenarios
- Long text samples for chunking tests (COST-01)
- Cache-related fixtures (COST-02)
- Long subtitle segments for testing
- Add TestSemanticSegmentationToggle to test_srt_processor.py (COST-03):
- Test enabling/disabling semantic segmentation
- Test cache enable/disable functionality
- Test configuration switches
All tests follow TDD RED state - failing tests for future implementation
- Test JSONDecodeError triggers retry 1 time before fallback
- Test ValidationError directly fallbacks without retry
- Test parse error logs LLM output fragment (first 500 chars)
- Test fallback logs error type and message
- Test retry uses INFO level logging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>