Commit Graph

3 Commits

Author SHA1 Message Date
starmen1265 d8cfee3bf1 feat(01-03): implement structured error handling
- 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>
2026-03-13 17:14:51 +08:00
starmen1265 2caddd792e feat(01-02): implement core pipeline schemas
- Add StepStatus enum (PENDING, RUNNING, COMPLETED, FAILED, SKIPPED)
- Add StepInput with content_id and platform validation
- Add StepOutput with success and error_message fields
- Add StepResult for step execution results
- Add StepRecord for step execution records
- Add WorkflowState with step management methods
- Add StepDefinition for step configuration
- Add pytest.ini for PYTHONPATH configuration
- TDD GREEN phase: all 28 tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 17:07:09 +08:00
starmen1265 85413bc1c6 test(01-02): add failing tests for core pipeline schemas
- 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>
2026-03-13 17:05:37 +08:00