feat(e2e): exclude external-service flows from production E2E runs #427
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-608-exclude-external-from-prod-e2e"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Production E2E dispatch must not touch Stripe or any other external service (real Stripe customers/subscriptions, outbound mail/SMS, live payment gateways). Real signups create real third-party records even on a free trial, which is how bunyip accumulated ~400 junk accounts (BUNYIP-273). PMS-271 split the E2E secrets into staging vs production with prod opt-in; this adds the behavioural gate on top of that wiring.
Establish an
@externalPlaywright tag as the single source of truth for "not prod-safe": any test that requires an external service is tagged@external, and the production run in .forgejo/workflows/e2e.yml excludes that set with--grep-invert @external. Staging, push, and pull_request runs pass no filter and run the full suite. The default is prod-safe (a spec is safe unless explicitly tagged), matching the agreed definition "everything not requiring Stripe or an external service".Add tests/external-guard.spec.ts: a canary tagged
@externalthat reads the new E2E_ENVIRONMENT var and asserts it is notproduction. On staging it runs and passes; if the--grep-invert @externalgate is ever removed from the production dispatch, the canary runs against prod, sees E2E_ENVIRONMENT=production, and fails the run, so the exclusion cannot silently regress. It also makes the gate demonstrable:playwright test --grep-invert @external --listdrops it (28 tests) vs the full list (29).Document the production-safe subset, the tag convention, the demonstration commands, the mechanical guard, the current audit (no product spec touches an external service today), and the escalation requirement (running an
@externalflow on prod needs David's sign-off and a manual run without the flag) in e2e/README.md. Document E2E_ENVIRONMENT in e2e/.env.example.#PMS-608