Commit 33457bc
test(e2e): Batch C LIVE prod specs (W-STACKS/STACKS-ADV/LIFECYCLE/AUTH2) (#186)
Adds e2e/live-stacks-lifecycle.spec.ts driving the stack, resource-
lifecycle, and secondary-auth user-flows against PROD via the minted
cohort account. Closes Batch C of the prod-coverage matrix (waves 11-14).
W-STACKS: POST /stacks/new (single-service minimal manifest -> 202
accepted contract) -> GET /api/v1/stacks (list) + GET /api/v1/stacks/:slug
+ GET /stacks/:slug (get) -> PATCH /stacks/:slug/env (merge -> 200, merged
key present; incremental + invalid-key 400) -> missing-slug 404 -> two-step
DELETE /stacks/:slug (paid 202 pending OR 200) + confirm-deletion cancel
-> skip-email reap -> gone. Full multi-service Kaniko build DEFERRED
(202-accepted contract only, mirrors live-writes deploy 202).
W-STACKS-ADV: GET /api/v1/stacks/:slug/family (PRO 200 + private
Cache-Control), POST /api/v1/stacks/:slug/promote (non-destructive
contract: 412 needs-build / 402 / 400 / 202, never 5xx; reaps any
accidentally-created sibling), DELETE confirm-deletion cancel arm (404 with
no pending row).
W-LIFECYCLE: on a FAST cache resource (no dedicated DB) -- pause -> resume
(Pro+), rotate-credentials, backup CONTRACT (cache -> 400
unsupported_resource_type, postgres-only; never waits for a real backup),
backups/restores list, reap.
W-AUTH2: POST /auth/email/start accepted contract (Brevo-gated, delivery
NOT asserted), POST /auth/github body-flow no-credential contract
(400 missing_code / 401 oauth_failed / 503 not-configured), and a
DISPOSABLE claimed-session logout round-trip (/auth/me 200 -> logout ->
SAME bearer 401). The logout leg NEVER revokes the shared minted JWT
(Batch B lesson) -- it claims a throwaway team and revokes THAT session.
cleanup-ledger.ts: add a `stack` entity kind (DELETE /stacks/:slug with
X-Skip-Email-Confirmation so a paid team's two-step flow doesn't strand
the reap behind an undeliverable confirmation email; account cascade is
the backstop).
Safety machinery mirrors live-writes/live-reads EXACTLY (rule 24):
E2E_LIVE=1 gating, assertSafeApiTarget, ledger-before-assert + inline reap
+ afterAll backstop, 503 per-service skips. Brevo/Razorpay contract-only;
no team-tier minting; slow services pinned off (cache hot-pool).
npm run gate green (tsc --noEmit + build + 1115 vitest pass).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2efb086 commit 33457bc
2 files changed
Lines changed: 919 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
118 | 131 | | |
119 | 132 | | |
120 | 133 | | |
| |||
157 | 170 | | |
158 | 171 | | |
159 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
160 | 182 | | |
161 | 183 | | |
162 | 184 | | |
| |||
0 commit comments