mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-12-05 17:38:25 +09:00
## Summary - Add E2E bypass mechanism to skip IP-based rate limiting during automated testing - E2E Happy Path test was failing at beta enrollment because GitHub Actions runners share IPs and hit the 1 enrollment per IP per 24h limit - Backend now accepts `X-E2E-Bypass-Key` header to skip IP rate limiting (keeps all other validations) ## Changes | File | Change | |------|--------| | `infrastructure/modules/secrets.py` | Add `e2e-bypass-key` secret | | `backend/config.py` | Add `e2e_bypass_key` config setting | | `backend/api/routes/users.py` | Add bypass header check before IP rate limit | | `frontend/e2e/production/happy-path-real-user.spec.ts` | Add route interception to inject bypass header | | `.github/workflows/e2e-happy-path.yml` | Add `E2E_BYPASS_KEY` env var | | `.github/workflows/ci.yml` | Add secret to Cloud Run deploy and happy-path job | ## Test plan - [x] Backend unit tests pass locally (1595 passed) - [ ] CI tests pass - [ ] After merge, trigger E2E Happy Path test and verify it passes Step 2 (Beta Enrollment) - [ ] Check backend logs for "E2E bypass key validated" message ## Security - Secret stored in GCP Secret Manager (managed by Pulumi) - Only valid key bypasses rate limit - invalid keys are logged as warnings - All other abuse prevention checks remain active (email validation, IP blocking, normalized email dedup) @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>