- Add test for abstract class instantiation prevention
- Add test for incomplete implementation detection
- Add test for complete implementation instantiation
- Add test for async method signatures
- Add shared fixtures for platform tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Created LinkParser for unified URL parsing (B站/知乎)
- Created IdempotencyChecker for file existence checking
- All 23 new tests passing, 95% coverage
- Requirements PLAT-01, PLAT-02, PLAT-03 completed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add LinkParser and ParsedLink to __init__.py exports
- Add IdempotencyChecker to __init__.py exports
- Update __all__ list with new public APIs
- All 23 tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create IdempotencyChecker class with check_exists method
- Check for metadata JSON and content Markdown files
- Return tuple of (all_exist, existing_files)
- Follow naming convention: {platform}_{content_id}_{type}.{ext}
- Add get_expected_files helper method
- Add 8 unit tests covering all scenarios
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create ParsedLink dataclass with platform, content_type, content_id fields
- Implement LinkParser class with regex-based URL parsing
- Support Bilibili video/article URLs (with/without www)
- Support Zhihu answer/zhuanlan URLs
- Support b23.tv short link resolution with requests.head
- Return None for unrecognized URLs (no exceptions)
- Add 15 unit tests covering all supported URL types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 1 Foundation verified with 5/5 must-haves passed.
All 9 requirements covered: PIPE-01~03, REL-01~03, VAL-01, MNT-02~03.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- retry_on_network_error decorator for automatic retry
- Max 3 attempts with exponential backoff (2s, 4s, max 10s)
- Only retries on NetworkError
- Logs retry attempts via before_sleep_log
- Reraises original exception after max attempts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary:
- WorkflowStateManager with atomic write and backup rotation
- 90% test coverage (20 tests)
- 5 min execution time
State updates:
- Plan counter advanced to 3
- Progress: 67% (2/3 plans complete)
- Requirements marked complete: PIPE-02, REL-01
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test retry on NetworkError (up to 3 times)
- Test no retry on non-NetworkError (ValidationError)
- Test reraise after max attempts
- Test preserved return value on success
- Test exponential backoff configuration
- Test cause exception preservation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add WorkflowStateManager to package exports for easier imports.
Users can now use: from kb_pipeline import WorkflowStateManager
All 20 tests pass with 90% coverage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test KBSettings required fields (base_path, archive_path)
- Test KBSettings optional fields with defaults
- Test secret fields (hf_token, zhihu_cookie) as SecretStr
- Test missing required fields raises ValidationError
- Test get_settings returns singleton via lru_cache
- Test env vars with KB_ prefix are read
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ErrorType enum with NETWORK, VALIDATION, SYSTEM, AUTH
- KBError base class with to_dict method for serialization
- NetworkError with status_code and auto-generated suggestion
- ValidationError with validation_errors list
- SystemError with system_message
- AuthError with auth_type
All errors include step_name, input_summary, error_type, message,
and suggestion for rich debugging context.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test ErrorType enum (NETWORK, VALIDATION, SYSTEM, AUTH)
- Test KBError base class with to_dict method
- Test NetworkError with status_code and auto-suggestion
- Test ValidationError with validation_errors list
- Test SystemError with system_message
- Test AuthError with auth_type
- Test error class hierarchy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create 01-02-SUMMARY.md with execution results
- Update STATE.md: Plan 2 of 3 completed, 8% progress
- Mark requirements complete: PIPE-01, PIPE-03, VAL-01, REL-03
- Update ROADMAP.md with plan progress
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add tests for WorkflowState methods (mark_step_started, mark_step_completed, mark_step_failed)
- Add tests for StepResult schema
- Add tests for StepDefinition schema with dependencies
- Achieve 100% test coverage on kb_pipeline/schemas.py
- Total 37 tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create kb_pipeline package structure
- Add test fixtures in conftest.py
- Add 28 test cases for StepInput, StepOutput, StepStatus, StepRecord, WorkflowState
- Add JSON serialization/deserialization tests
- TDD RED phase: tests fail because schemas.py not yet implemented
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update VALIDATION.md test file paths to use tests/test_pipeline/
instead of tests/unit/ to match PLAN.md definitions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Nyquist validation contract for Phase 1 Foundation.
Covers test infrastructure, sampling rate, and per-task verification map.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create SUMMARY.md with execution results
- Update STATE.md with decisions and metrics
- Mark BRDG-06 requirement as complete
- Update ROADMAP.md with phase 4 completion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>