test(e2e): W3 LIVE claim/conversion + deploy-lifecycle + env-switcher coverage#173
Merged
Conversation
… coverage Real-backend (E2E_LIVE=1-gated) cross-surface E2E for the W3 matrix wave, building on the WS1-P1 harness + W1/W2 specs (mirrors their gating, cohort tagging, cleanup-ledger + reaper patterns exactly). Brevo-free: accounts are minted via anon-provision → /claim (which returns a real session_token). Flows covered: - Claim/conversion (anon→claimed): anon provision → /claim → the resource is team-owned + visible in GET /api/v1/resources; claim-replay of the same token → 409 already_claimed (single-use JWT, rule 7). - Env switcher: provision dev vs prod → GET /api/v1/resources?env= returns only that env (the dashboard's per-env read), provision echoes the resolved env (rule 11). - Deploy lifecycle [STAGING-ONLY]: /deploy/new → 202 accepted contract (id/app_id/status/environment) → GET /api/v1/deployments/:id/events timeline surface → DELETE → gone. Tier elevation uses the DEV-ONLY /internal/set-tier (404s + skips loudly in prod — never crosses billing). Full Kaniko build→live-URL leg deferred (too slow/heavy for E2E). Each leg is a UI-action → backend-state-change → UI-read-surface assertion (the login-outage class). Named live-*.spec.ts so per-PR CI ignores it and the playwright.live.config.ts testMatch + the ledger reaper pick it up. Skips cleanly (5 skipped) without E2E_LIVE. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mastermanas805
enabled auto-merge (squash)
June 4, 2026 20:01
size-limit report 📦
|
github-code-quality flagged the unused const in live-claim-deploy.spec.ts; required_conversation_resolution on main blocked the merge. Remove the dead constant. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
auto-merge was automatically disabled
June 4, 2026 20:52
Head branch was modified
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Next P0 UI matrix wave (W3) from the USER-FLOW-INVENTORY-AND-TEST-MATRIX: real-backend (
E2E_LIVE=1-gated) cross-surface E2E for claim/conversion + deploy-lifecycle + env-switcher. Builds on the merged WS1-P1 harness (#170) and the W1/W2 specs (#171, #172) — mirrors theirE2E_LIVE=1gating, cohort tagging, cleanup-ledger + reaper patterns exactly.Brevo-free account mint per TEST-ACCOUNTS-AND-NR-SYNTHETICS-PLAN.md: anonymous provision →
/claim, which returns a realsession_tokenusable as a dashboard Bearer. No email round-trip, no GitHub, no Brevo.Flows covered
Claim/conversion (anon→claimed)
POST /claim→ assert the resource is now owned by the new team and visible inGET /api/v1/resources(the dashboard's resource read surface).409 already_claimed(single-use JWT, rule 7).Env switcher (dashboard)
developmentvsproduction→GET /api/v1/resources?env=(the exact callapi/client.ts listResources(env)makes) returns only that env's resources, no cross-env leak; each provision echoes the resolvedenv(rule 11). (The global chrome switcher is currently retired inuseDashboardCtx.ts; the load-bearing surface IS the?env=query, which the VaultPage env tabs + any future switcher sit on.)Deploy lifecycle — STAGING-ONLY
POST /deploy/new(minimal hand-rolled gzipped-tar context) →202accepted contract (id/app_id/status/environment) →GET /api/v1/deployments/:id/eventstimeline surface (fix(deployments): hide empty-state during load error (F1) #200) →DELETE→ gone.POST /internal/set-tier(a freshly-claimed team isfree=deployments_apps=0→ would 402). That endpoint 404s in prod, so the leg skips loudly outside a dev/staging stack — tier elevation never crosses a real billing path.Each leg is a UI-action → backend-state-change → UI-read-surface assertion (the login-outage class).
Safety (rule 24)
E2E_LIVE=1-gated; whole file SKIPS loudly in normal PR CI (verified: 5 skipped with no live backend).afterAllbackstop + out-of-processreap-cohort.ts.live-*.spec.ts→ picked up byplaywright.live.config.tstestMatch + the ledger reaper; the default mocked per-PR config ignores it.cohort.ts:14-19).Gate
npm run gate(tsc --noEmit && npm run build && vitest run) GREEN: 1115 passed | 3 skipped (pre-existing), mocked suite intact.🤖 Generated with Claude Code