- 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>
- Add new-project action handling in handle_callback
- Supports Create New Project button from error cards
- Updates user context when project is created via callback
- Add 4 new tests in TestHandleCallback for new-project action
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add _is_long_command method to detect long-running commands
- Update handle_message to use adaptive timeout based on command type
- Long commands (execute-phase, plan-phase, etc.) use timeout=None
- Regular commands use DEFAULT_TIMEOUT (60 seconds)
- Add TestAdaptiveTimeout test class with 6 test cases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add LONG_COMMANDS set with execute-phase, plan-phase, discuss-phase, new-project
- Add _is_long_command method to detect long-running commands
- Add TestLongCommands test class with 5 test cases
- Long commands will use no timeout in execute()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Created 04-02-SUMMARY.md with TDD execution details
- Updated STATE.md with new decisions and position
- Updated ROADMAP.md with 04-02 completion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 04-01-SUMMARY.md with execution details and deviations
- Update STATE.md to reflect Phase 4 progress (1/3 plans complete)
- Update ROADMAP.md to mark 04-01 as complete
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Generic commands now use project from user context first
- Fall back to context param or default if no user context
- Add users_root parameter to Orchestrator for test isolation
- Update integration tests to use tmp_users_root fixture
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add _handle_use_project method
- Update user context when switching projects
- Return error card with Create button for non-existent projects
- Route use command in handle_message
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add TestUserContext: tests for UserContext dataclass (creation, to_dict, from_dict)
- Add TestUserContextManager: tests for manager initialization and load
- Add TestAtomicWrites: tests for atomic save with backup rotation
- Add TestMultiUser: tests for multi-user isolation and convenience methods
- Add tmp_users_root and user_context_manager fixtures to conftest.py
- Export UserContext and UserContextManager from __init__.py
Note: Implementation was already done in commit 9bd29a2 as part of 04-02 plan.
This commit adds the tests that should have been part of 04-01 TDD workflow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test _handle_use_project updates user context
- Test success card when project exists
- Test error card with Create button when project doesn't exist
- Test handle_message routes use command
- Test empty project name returns error
- Test subsequent commands use project from user context
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add UserContextManager for per-user project tracking
- Add _handle_new_project method that pre-creates sessions
- Update user context after new-project creation
- Route new-project command in handle_message
- Add LONG_COMMANDS class attribute for timeout control
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test Orchestrator initializes with UserContextManager
- Test _handle_new_project creates session before executing
- Test _handle_new_project updates user context
- Test _handle_new_project executes command in session
- Test _handle_new_project returns success card
- Test handle_message routes new-project command
- Test empty project name returns error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>