- Add 28 unit tests for SourceService (TEST-004)
- Test all CRUD operations
- Test validation logic
- Test error handling
- Test research functionality
- Add 13 integration tests for sources API (TEST-005)
- Test POST /sources endpoint
- Test GET /sources endpoint with filters
- Test DELETE /sources endpoint
- Test POST /sources/research endpoint
- Fix ValidationError signatures in SourceService
- Fix NotebookLMError signatures
- Fix status parameter shadowing in sources router
Coverage: 28/28 unit tests pass, 13/13 integration tests pass
Implement Sprint 2: Source Management
- Add SourceService with create, list, delete, research methods
- Add POST /api/v1/notebooks/{id}/sources - Add source (URL, YouTube, Drive)
- Add GET /api/v1/notebooks/{id}/sources - List sources with filtering
- Add DELETE /api/v1/notebooks/{id}/sources/{source_id} - Delete source
- Add POST /api/v1/notebooks/{id}/sources/research - Web research
- Add ResearchRequest model for research parameters
- Integrate sources router with main app
Endpoints:
- POST /sources - 201 Created
- GET /sources - 200 OK with pagination
- DELETE /sources/{id} - 204 No Content
- POST /sources/research - 202 Accepted
Technical:
- Support for url, youtube, drive source types
- Filtering by source_type and status
- Validation for research mode (fast/deep)
- Error handling with standardized responses
Related: Sprint 2 - Source Management