chore(plan): marca Phase B (Tasks 6-9) completada

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Juan
2026-05-10 10:30:40 +02:00
co-authored by Claude Opus 4.7
parent d774a6b509
commit 2fffecb988
+12 -12
View File
@@ -888,7 +888,7 @@ git commit -m "feat(observability): logging JSON estructurado con structlog y tr
- Create: `core/src/agentforge_core/llm/base.py`
- Create: `tests/unit/test_llm_base.py`
- [ ] **Step 1: Test**
- [x] **Step 1: Test**
```python
"""Test de los modelos base del proveedor LLM."""
@@ -911,7 +911,7 @@ def test_completion_result_campos_basicos() -> None:
assert r.tokens_in == 10
```
- [ ] **Step 2: Implementar**
- [x] **Step 2: Implementar**
```python
"""Tipos y Protocol del proveedor LLM (Strategy pattern)."""
@@ -949,7 +949,7 @@ class LLMProvider(Protocol):
) -> CompletionResult: ...
```
- [ ] **Step 3: Verificar y commit**
- [x] **Step 3: Verificar y commit**
```bash
pytest tests/unit/test_llm_base.py -v
@@ -967,7 +967,7 @@ git commit -m "feat(llm): añade Protocol LLMProvider con Message y CompletionRe
El MockProvider devuelve respuestas pregrabadas según el contenido del último mensaje del usuario. Cuando ningún patrón coincide, devuelve una respuesta canónica de "incident analyzer" para que la demo arranque sin claves API.
- [ ] **Step 1: Test**
- [x] **Step 1: Test**
```python
"""Tests del proveedor LLM mock determinista."""
@@ -1007,7 +1007,7 @@ async def test_mock_provider_respuesta_canonica_si_no_match(provider: MockProvid
assert parsed["severity"] in {"low", "medium", "high", "critical"}
```
- [ ] **Step 2: Implementar**
- [x] **Step 2: Implementar**
```python
"""Proveedor LLM mock determinista para demos sin API keys y tests reproducibles."""
@@ -1141,7 +1141,7 @@ class MockProvider:
return _DEFAULT_RESPONSE
```
- [ ] **Step 3: Verificar y commit**
- [x] **Step 3: Verificar y commit**
```bash
pytest tests/unit/test_llm_mock.py -v
@@ -1159,7 +1159,7 @@ git commit -m "feat(llm): añade MockProvider determinista con 3 escenarios can
Estos proveedores no se testean en CI (requieren claves) — el factory los enchufa solo si las variables están presentes. Documentar comportamiento y dejar el código listo para producción.
- [ ] **Step 1: Implementar `azure.py`**
- [x] **Step 1: Implementar `azure.py`**
```python
"""Proveedor Azure OpenAI con retry exponencial y fallback configurable."""
@@ -1240,7 +1240,7 @@ class AzureOpenAIProvider:
)
```
- [ ] **Step 2: Implementar `openai.py`**
- [x] **Step 2: Implementar `openai.py`**
```python
"""Proveedor OpenAI directo (fallback)."""
@@ -1303,7 +1303,7 @@ class OpenAIProvider:
raise last_exc
```
- [ ] **Step 3: Commit**
- [x] **Step 3: Commit**
```bash
git add core/src/agentforge_core/llm/azure.py core/src/agentforge_core/llm/openai.py
@@ -1318,7 +1318,7 @@ git commit -m "feat(llm): añade AzureOpenAIProvider y OpenAIProvider con retry
- Create: `core/src/agentforge_core/llm/factory.py`
- Create: `tests/unit/test_llm_factory.py`
- [ ] **Step 1: Test**
- [x] **Step 1: Test**
```python
"""Tests del factory LLM."""
@@ -1341,7 +1341,7 @@ def test_factory_azure_requiere_credenciales() -> None:
build_llm_provider(s)
```
- [ ] **Step 2: Implementar**
- [x] **Step 2: Implementar**
```python
"""Factory que selecciona el LLMProvider según settings."""
@@ -1373,7 +1373,7 @@ def build_llm_provider(settings: Settings) -> LLMProvider:
)
```
- [ ] **Step 3: Verificar y commit**
- [x] **Step 3: Verificar y commit**
```bash
pytest tests/unit/test_llm_factory.py -v