# Staging E2E Verification Report

**Updated:** 2026-05-31  
**Status:** All 14 flows scripted — **live staging run required for GO**

## Quick start

```bash
# On staging server / against staging URL
export STAGING_E2E_ENABLED=true
export STAGING_E2E_SECRET=your-long-secret
export PLAYWRIGHT_STAGING=1
export PLAYWRIGHT_SKIP_WEBSERVER=1
export PLAYWRIGHT_BASE_URL=https://staging.example.com
export PLAYWRIGHT_STAGING_EMAIL=requester@company.com
export PLAYWRIGHT_STAGING_HEAD_EMAIL=head@company.com
export PLAYWRIGHT_STAGING_COLLABORATOR_EMAIL=agent@company.com
export PLAYWRIGHT_STAGING_PORTAL_SLUG=it-support

bash scripts/run-staging-e2e.sh
```

## Health pre-check

Runs automatically via `global-setup.staging.ts` before tests. Fails fast if any of: database, cache, queue, mail, storage, reverb is in `error` state.

## Mail verification (Option C + capture)

- `STAGING_E2E_FIXED_OTP` — deterministic OTP in staging/local only  
- Mail capture cache — Playwright polls `/staging/e2e/mail-capture` (requires secret header)  
- Mail report — `/staging/e2e/mail-report?emails=...`

## Artifacts

| File | Purpose |
|------|---------|
| `docs/e2e/health-pre-check.json` | Pre-run health snapshot |
| `docs/e2e/staging-run-report.json` | Flow + mail report summary |
| `docs/e2e/*.png` | Step screenshots |
| `playwright-report/` | HTML report + traces (on failure) |

## CI

Workflow: `.github/workflows/staging-gate.yml`  
Enable with repository variable `STAGING_GATE_ENABLED=true` and staging secrets.

See also: `docs/PRODUCTION_GO_NO_GO_REPORT.md`
