refactor(api): TOML 配置 SSOT、统一错误契约、Auth/事务加固与可观测性 (#33)

配置 SSOT(TOML + .env)
统一错误契约
Auth 与事务边界
Redis / Celery 可靠性:业务 Redis(DB/0)与 Celery broker/backend(DB/1)显式拆分;连接池、sync client
可观测性(OpenTelemetry + LGTM)
This commit is contained in:
Sully
2026-05-22 13:44:50 +08:00
committed by GitHub
parent f09ae248f9
commit 53e0065e3e
298 changed files with 15247 additions and 4344 deletions

View File

@@ -4,6 +4,7 @@ import pytest
from httpx import ASGITransport, AsyncClient
from app.features.evaluation.internal_auth import get_internal_eval_principal
from tests.conftest import install_test_error_handlers
@pytest.mark.asyncio
@@ -19,7 +20,7 @@ async def test_internal_eval_list_fixtures_requires_config(
)
from app.features.evaluation.router import router
app = FastAPI()
app = install_test_error_handlers(FastAPI())
app.include_router(router, prefix="/internal/api/evaluation")
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://t") as client:
@@ -50,7 +51,7 @@ async def test_internal_eval_with_override_lists_fixtures(
from app.features.evaluation.router import router
app = FastAPI()
app = install_test_error_handlers(FastAPI())
app.include_router(router, prefix="/internal/api/evaluation")
async def _override_auth():