fix(prod): production hardening for launch #194

Open
chihlasm wants to merge 2 commits from fix/production-hardening into main

2 Commits

Author SHA1 Message Date
63e5881972 test(e2e): disable rate limiting in the Playwright backend webserver
Some checks failed
Mirror to GitHub / mirror (push) Successful in 4s
CI / frontend (pull_request) Successful in 6m47s
CI / backend (pull_request) Failing after 9m24s
CI / e2e (pull_request) Successful in 10m26s
RATE_LIMIT_ENABLED now defaults on regardless of DEBUG; the e2e suite
logs in dozens of times per run from one IP and trips the per-minute
auth limits (429 at helpers/api.ts login).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 20:14:05 -04:00
c4947218a4 fix(prod): harden production configuration for launch
Some checks failed
Mirror to GitHub / mirror (push) Successful in 5s
CI / frontend (pull_request) Successful in 7m12s
CI / e2e (pull_request) Failing after 6m56s
CI / backend (pull_request) Failing after 9m55s
- 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>
2026-06-12 19:41:28 -04:00