feat: complete phase 4 -- conversation replay API + analytics dashboard
- Replay models: StepType enum, ReplayStep, ReplayPage frozen dataclasses
- Checkpoint transformer: PostgresSaver JSONB -> structured timeline steps
- Replay API: GET /api/conversations (paginated), GET /api/replay/{thread_id}
- Analytics models: AgentUsage, InterruptStats, AnalyticsResult
- Analytics event recorder: Protocol + PostgresAnalyticsRecorder + NoOp
- Analytics queries: resolution_rate, agent_usage, escalation_rate, cost, interrupts
- Analytics API: GET /api/analytics?range=Xd with envelope response
- DB migration: analytics_events table + conversations column additions
- 74 new tests, 399 total passing, 92.87% coverage
This commit is contained in:
@@ -55,7 +55,7 @@ class TestDbModule:
|
||||
from app.db import setup_app_tables
|
||||
|
||||
await setup_app_tables(mock_pool)
|
||||
assert mock_conn.execute.await_count == 2
|
||||
assert mock_conn.execute.await_count == 4
|
||||
|
||||
def test_ddl_statements_valid(self) -> None:
|
||||
assert "CREATE TABLE IF NOT EXISTS conversations" in _CONVERSATIONS_DDL
|
||||
|
||||
Reference in New Issue
Block a user