fix(prod): harden production configuration for launch
All checks were successful
Mirror to GitHub / mirror (push) Successful in 5s
All checks were successful
Mirror to GitHub / mirror (push) Successful in 5s
- Gate Swagger/ReDoc/OpenAPI behind DEBUG (no public API schema in prod) - Sentry send_default_pii only in dev (no auth headers/bodies in events) - Remove alembic from Dockerfile CMD (releaseCommand owns migrations; CMD copy raced across replicas/restarts) - Decouple rate limiting from DEBUG via RATE_LIMIT_ENABLED (PR envs with DEBUG=true were unlimited); tests disable the live limiter in conftest - max_instances=1 on the 4 scheduler jobs missing it - Boot-time failure when SELF_SERVE_ENABLED without RESEND_API_KEY/ANTHROPIC_API_KEY/FRONTEND_URL - Reject localhost OAUTH_REDIRECT_BASE outside DEBUG - pool_pre_ping + pool_recycle on the app engine - Frontend: DEV-gate stale-async console.warn; document VITE_SELF_SERVE_ENABLED fallback semantics in Dockerfile Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,12 @@ from app import models as _models # noqa: F401
|
||||
# Disable invite code requirement for tests
|
||||
settings.REQUIRE_INVITE_CODE = False
|
||||
|
||||
# Disable rate limiting in tests — auth-heavy suites would trip the
|
||||
# per-minute login/register limits. The limiter is constructed at import
|
||||
# time, so flip the live instance rather than the setting.
|
||||
from app.core.rate_limit import limiter as _limiter # noqa: E402
|
||||
_limiter.enabled = False
|
||||
|
||||
# Test database URL — NEVER reuse DATABASE_URL. The test_db fixture does
|
||||
# `DROP SCHEMA public CASCADE` on every test; if DATABASE_URL (which normally
|
||||
# points at the dev/prod DB) leaked into this value, running `pytest tests/`
|
||||
|
||||
Reference in New Issue
Block a user