feat(e2e): exclude external-service flows from production E2E runs #427

Merged
Claude-Run merged 1 commit from feat/PMS-608-exclude-external-from-prod-e2e into main 2026-07-04 03:48:19 +02:00
Member

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 @external Playwright 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 @external that reads the new E2E_ENVIRONMENT var and asserts it is not production. On staging it runs and passes; if the --grep-invert @external gate 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 --list drops 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 @external flow 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

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 `@external` Playwright 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 `@external` that reads the new E2E_ENVIRONMENT var and asserts it is not `production`. On staging it runs and passes; if the `--grep-invert @external` gate 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 --list` drops 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 `@external` flow 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
feat(e2e): exclude external-service flows from production E2E runs
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 47s
Check / fmt + clippy + build + tests (pull_request) Successful in 1m55s
Integration / integration tests (pull_request) Successful in 9m8s
Create release / Gate (release-branch merges only) (pull_request) Successful in 0s
Create release / Create release from merged PR (pull_request) Has been skipped
83a59631cc
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 `@external` Playwright 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 `@external` that reads the new E2E_ENVIRONMENT var and asserts it is not `production`. On staging it runs and passes; if the `--grep-invert @external` gate 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 --list` drops 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 `@external` flow 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
Claude-Run deleted branch feat/PMS-608-exclude-external-from-prod-e2e 2026-07-04 03:48:19 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!427
No description provided.