These tests import classes and functions that no longer exist:
- ContentGenerationService (renamed to ContentGenerator)
- ContentRuleEngine, ContentHTMLParser (rule_engine.py deprecated)
- ContentAugmenter (depends on dead rule_engine imports)
- get_domain_from_site (removed from site_page_generator)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add explicit anchor text mode support in AnchorTextConfig
- Support tier-specific anchor text terms at job-level (tier1, tier2, tier3, tier4_plus)
- Support tier-level explicit anchor text with 'terms' array
- Update content injection to prioritize explicit terms when mode is 'explicit'
- Add validation for explicit mode requiring term lists
- Update JOB_FIELD_REFERENCE.md with explicit mode documentation and examples
- Add comprehensive unit and integration tests for explicit anchor text
Includes multi-cloud storage migration script and related database changes.
- Add S3StorageClient class implementing StorageClient Protocol
- Support AWS S3 and S3-compatible services with custom endpoints
- Automatic bucket configuration for public read access only
- Content-type detection for uploaded files
- URL generation (default S3 URLs and custom domain support)
- Error handling for common S3 errors (403, 404, NoSuchBucket, etc.)
- Retry logic with exponential backoff (consistent with BunnyStorageClient)
- Update storage_factory to return S3StorageClient for 's3' and 's3_compatible'
- Add comprehensive unit tests with mocked boto3 calls (18 tests, all passing)
Implements Story 6.2 from Epic 6: Multi-Cloud Storage Support
- Add CLI commands for user management (add-user, delete-user, list-users)
- Implement admin authentication for all user management commands
- Add password confirmation and deletion safety checks
- Prevent admins from deleting their own accounts
- Create 17 unit tests with mocked dependencies
- Create 18 integration tests with real database
- Add shared db_session fixture in conftest.py
- Update CLI commands to use db_manager for session handling
- Complete story documentation with usage examples
All 35 tests passing. Story 1.5 complete.
- Implemented FastAPI application with authentication
- Created health check endpoint (GET /health)
- Added authenticated endpoint (GET /api/v1/me)
- Added admin-only endpoint (GET /api/v1/admin/status)
- Implemented HTTP Basic Authentication with bcrypt
- Added role-based access control (Admin vs User)
- Created Pydantic schemas for request/response validation
- Added dependency injection for auth services
- Wrote 16 unit tests (all passing)
- Wrote 15 integration tests with real database (all passing)
- Added httpx to requirements for FastAPI TestClient
- Versioned API endpoints (/api/v1/) for extensibility
- Automatic OpenAPI documentation at /docs
- Complete story documentation
All acceptance criteria met:
✓ Basic REST API created
✓ Health check endpoint available
✓ API endpoints require authentication
✓ Designed to be extensible for future use
Story 1.1: Project Initialization & Configuration
- Set up monorepo structure with Python application
- Configured .env.example with all required environment variables
- Implemented JSON configuration file parsing (master.config.json)
- Initialized project dependencies in requirements.txt
Story 1.2: Database Setup & User Model
- Implemented SQLite database connection with SQLAlchemy
- Created User model with username, hashed_password, and role fields
- Implemented Repository Pattern for data access layer
- Created database initialization script (scripts/init_db.py)
- Added database session management
- User model supports Admin and User roles with is_admin() helper
Story 1.3: User Authentication System
- Implemented AuthService with secure password hashing (bcrypt)
- Added hash_password() and verify_password() methods
- Implemented authenticate_user() for credential validation
- System correctly identifies user roles (Admin/User)
- Authentication fails gracefully for invalid credentials
- Added comprehensive unit tests (10 tests)
- Added integration tests with database (5 tests)
- All 15 tests passing
Technical improvements:
- Database-agnostic design using Repository Pattern
- Secure password hashing with bcrypt
- Proper separation of concerns across layers
- Type hints throughout codebase
- Comprehensive test coverage
- Create monorepo directory structure as defined in architecture
- Initialize Python project with core dependencies (FastAPI, SQLAlchemy, Click, Pydantic)
- Add requirements.txt with all necessary libraries
- Create env.example with placeholders for all cloud provider secrets
- Implement master.config.json with comprehensive configuration
- Add Pydantic-based configuration loading and validation
- Create basic CLI framework with health check and config commands
- Set up main.py as CLI entry point
- Organize all modules according to source tree specification
This completes the foundational infrastructure for Epic 1: Foundation & Core Services.