promptlooper/backend/tests
John Lightner 35d72e7fa8 MAESTRO: Implement LLM endpoints router with CRUD, test_connection, and Fernet-encrypted API key storage
- Add LLMEndpoint model to models.py with encrypted api_key field
- Create encryption.py with Fernet symmetric encryption (key derived from JWT_SECRET via PBKDF2)
- Implement full endpoints router: list, get, create, update, delete + test_connection
- Test endpoint calls adapter.test_connection() and list_models()
- API keys never exposed in responses; has_api_key boolean flag added
- 25 tests in test_endpoints.py, all 444 tests passing
2026-04-07 03:13:52 -05:00
..
__init__.py MAESTRO: Create full directory structure with placeholder files 2026-04-07 01:40:27 -05:00
test_adapters_base.py MAESTRO: Implement BaseAdapter abstract class and AdapterResponse dataclass 2026-04-07 02:32:57 -05:00
test_alembic.py MAESTRO: Set up Alembic with initial migration for all 8 ORM models 2026-04-07 01:52:03 -05:00
test_auth.py MAESTRO: Create backend/auth.py with JWT, API key auth, and first-boot setup flow 2026-04-07 01:59:24 -05:00
test_cache.py MAESTRO: Implement ResponseCache layer with SHA-256 config hashing and hit-rate tracking 2026-04-07 02:37:58 -05:00
test_config.py MAESTRO: Create backend/config.py with Pydantic Settings and SQLite/in-process fallback 2026-04-07 01:46:30 -05:00
test_endpoints.py MAESTRO: Implement LLM endpoints router with CRUD, test_connection, and Fernet-encrypted API key storage 2026-04-07 03:13:52 -05:00
test_main.py MAESTRO: Create backend/main.py with FastAPI app, CORS, health check, WebSocket, and router mounting 2026-04-07 01:56:40 -05:00
test_models.py MAESTRO: Create backend/models.py with all 8 SQLAlchemy ORM models from spec 2026-04-07 01:49:10 -05:00
test_openai_compat.py MAESTRO: Implement OpenAI-compatible LLM adapter with streaming, retries, and tests 2026-04-07 02:35:52 -05:00
test_routers.py MAESTRO: Implement LLM endpoints router with CRUD, test_connection, and Fernet-encrypted API key storage 2026-04-07 03:13:52 -05:00
test_runner.py MAESTRO: Implement run execution engine with Jinja2 templating, caching, scoring, and event bus 2026-04-07 02:48:20 -05:00
test_schemas.py MAESTRO: Create backend/schemas.py with all Pydantic request/response schemas 2026-04-07 01:54:02 -05:00
test_scorer_base.py MAESTRO: Implement BaseScorer abstract class with sync/async scoring interface 2026-04-07 02:55:05 -05:00
test_scorer_embedding.py MAESTRO: Implement EmbeddingScorer with cosine similarity scoring via OpenAI-compatible embedding API 2026-04-07 02:58:00 -05:00
test_scorer_format.py MAESTRO: Implement FormatScorer with json, markdown, length, and structure format checks 2026-04-07 03:00:56 -05:00
test_scorer_keyword.py MAESTRO: Implement KeywordScorer with presence/absence keyword checking and ratio scoring 2026-04-07 03:02:40 -05:00
test_scorer_llm_judge.py MAESTRO: Implement LLMJudgeScorer with configurable judge prompt, rating parsing, and response caching 2026-04-07 03:05:00 -05:00
test_stack_integration.py MAESTRO: Add entrypoint migrations, worker config, and stack integration tests 2026-04-07 02:09:56 -05:00
test_sweep.py MAESTRO: Implement sweep orchestration engine with grid, random, and guided sweep types 2026-04-07 02:53:30 -05:00
test_tasks.py MAESTRO: Implement Celery tasks (execute_run, execute_sweep) with synchronous fallback for single-container mode 2026-04-07 03:08:41 -05:00
test_worker.py MAESTRO: Add entrypoint migrations, worker config, and stack integration tests 2026-04-07 02:09:56 -05:00