mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
## Why The daily tenant E2E (`scripts/e2e/tenant_e2e.py`) drove the whole flow via **direct backend API calls**, bypassing the frontend. Two problems: 1. **Not representative** — it never exercised the tenant portal UI a real operator uses. 2. **Intermittent stuck-render orphans** (Run #31 vocalstar, #32 singa) — because it never loaded the lyrics-review page, it never fired `encoding-worker/warmup`, so the encoder was cold when the render started and the job orphaned in `rendering_video` (no recovery). Root-caused this session; the fix is to make the test faithful, which fires the warmup a real user fires. ## What Replaces `tenant_e2e.py` with **`frontend/e2e/production/tenant-happy-path.spec.ts`** — a Playwright journey mirroring `happy-path-real-user.spec.ts`, run per-tenant via the existing `e2e-tenant-daily.yml` matrix (vocalstar, singa; `max-parallel: 1`): login (real magic-link UI) → submit track (tenant form + real audio upload) → wait for transcription → **open review UI (fires warmup)** → approve → wait for render → assert tenant distribution (Dropbox present, no YouTube, downloads, `is_private`) → cleanup. - **Tenant auth**: added `inbox.testmail.app` to both tenants' `allowed_email_domains` (setup scripts + live GCS config via `scripts/e2e/update_tenant_allowlist.py`) so the test signs in through the real magic-link UI. - **Test audio**: short 60s clips fetched from private GCS in CI (`scripts/e2e/fetch_test_audio.sh`) — fast, reliable uploads and quick renders. - Workflow reworked to Node/Playwright; `tenant_e2e.py` deleted; version `0.190.3 → 0.190.4`. ## Findings surfaced (validating the exercise) - **Browser upload was CORS-blocked in Playwright** by the shared config's global `x-playwright-test` header (it made the GCS signed-URL PUT preflight request a header the bucket's CORS doesn't allow). Verified the same PUT succeeds in a real browser — a **test-harness artifact, not a product bug**. Worked around by stripping the header for `storage.googleapis.com` requests. (Note: any prod E2E doing a browser signed-URL upload is affected by this global header.) ## Verification Both tenants run **green end-to-end against prod** locally (login → submit → review → render → distribution; render completed without orphaning). Reworked workflow dispatched on this branch to confirm CI wiring (Node setup + private-audio fetch + secrets). Test-only + CI + tenant-config change. No product code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) @coderabbitai ignore --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 lines
553 B
Bash
Executable File
12 lines
553 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Download the shared E2E test audio pair (mixed + instrumental) used by the
|
|
# tenant frontend E2E. Gitignored — not committed (12MB). Requires gcloud auth
|
|
# (WIF in CI, ADC locally) with read access to the storage bucket.
|
|
set -euo pipefail
|
|
DEST="${1:-frontend/e2e/fixtures}"
|
|
SRC="gs://karaoke-gen-storage-nomadkaraoke/e2e-tests/shared/short"
|
|
mkdir -p "$DEST"
|
|
gcloud storage cp "$SRC/e2e-mixed.mp3" "$DEST/e2e-mixed.mp3"
|
|
gcloud storage cp "$SRC/e2e-instrumental.mp3" "$DEST/e2e-instrumental.mp3"
|
|
echo "Fetched test audio to $DEST"
|