fix: restore green builds and align frontend-backend contracts (P0)
- Isolate Settings tests from .env and process env leakage - Fix analytics metadata test to unwrap psycopg Json wrapper - Remove unused state variables causing frontend build failures - Fix ReviewPage to use /classifications endpoint instead of nonexistent /result - Normalize ReviewPage status enums (failed not error) and access_type values - Align api.ts types with backend response shapes (ReplayPage, AnalyticsData, AgentUsage)
This commit is contained in:
@@ -145,4 +145,11 @@ class TestPostgresAnalyticsRecorder:
|
||||
)
|
||||
call_args = mock_conn.execute.call_args
|
||||
params = call_args[0][1]
|
||||
assert params["metadata"] == {"key": "val"}
|
||||
# PostgresAnalyticsRecorder wraps metadata with psycopg Json() adapter.
|
||||
# Unwrap to compare the inner dict.
|
||||
from psycopg.types.json import Json
|
||||
|
||||
meta = params["metadata"]
|
||||
if isinstance(meta, Json):
|
||||
meta = meta.obj
|
||||
assert meta == {"key": "val"}
|
||||
|
||||
Reference in New Issue
Block a user