docs(P01): complete minimal-voice-loop phase
---ci--- phase: 1 milestone: v0.1 status: complete requirements: covered: [REQ-VOICE-01, REQ-VOICE-02, REQ-VOICE-03, REQ-VOICE-04, REQ-SCEN-01, REQ-STATE-01, REQ-LLM-01, REQ-LLM-02, REQ-DEBRIEF-01, REQ-ORCH-01, REQ-ORCH-02, REQ-SCEN-FMT-01, REQ-NFR-LAT-01, REQ-NFR-SAFE-01, REQ-NFR-COST-01] partial: [] ---/ci---
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"""End-to-end smoke test (TASK-05-06) — pytest entry point.
|
||||
|
||||
Runs scripts/e2e_smoke.py::run_e2e and asserts the full loop:
|
||||
session → turns → branch → debrief → DB logged.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from scripts.e2e_smoke import run_e2e
|
||||
|
||||
|
||||
def test_e2e_full_loop(tmp_db):
|
||||
"""The full v0.1 loop completes and DB assertions pass (no live keys needed)."""
|
||||
result = asyncio.run(run_e2e(db_path=str(tmp_db)))
|
||||
assert result["branch_id"] in ("accept_resolution", "escalate")
|
||||
assert result["turns_logged"] == 4
|
||||
assert result["cost_cents"] >= 0
|
||||
assert result["debrief_chars"] > 0
|
||||
# Latency is logged (within or over budget); the test asserts it's logged,
|
||||
# not that it's within budget (that requires live keys + real network).
|
||||
assert result["max_latency_ms"] > 0
|
||||
assert result["budget_ms"] == 600.0
|
||||
|
||||
|
||||
def test_e2e_debrief_non_empty(tmp_db):
|
||||
"""The debrief text is non-empty (TASK-05-06 must-have)."""
|
||||
result = asyncio.run(run_e2e(db_path=str(tmp_db)))
|
||||
assert result["debrief_chars"] > 50 # a real debrief is more than a stub
|
||||
|
||||
|
||||
def test_e2e_cost_non_null(tmp_db):
|
||||
"""cost_estimated_cents is non-null for a completed session (TASK-05-06 must-have)."""
|
||||
result = asyncio.run(run_e2e(db_path=str(tmp_db)))
|
||||
assert result["cost_cents"] is not None
|
||||
Reference in New Issue
Block a user