test(e2e): Batch C LIVE prod specs (W-STACKS/STACKS-ADV/LIFECYCLE/AUTH2) - #186
Merged
Merged
Conversation
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>
mastermanas805
enabled auto-merge (squash)
June 5, 2026 08:51
size-limit report 📦
|
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.
Batch C — live-PRODUCTION integration coverage
Adds
e2e/live-stacks-lifecycle.spec.tscovering the stack, resource-lifecycle, and secondary-auth user-flows againsthttps://api.instanode.devvia the minted PRO cohort account. Closes Batch C ofdocs/sessions/2026-06-04/PROD-COVERAGE-MATRIX.md(waves 11–14). Copies the Batch B / Batch A conventions exactly for the safety machinery (rule 24).Waves
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-stepDELETE /stacks/:slug(paid 202 pending OR 200 immediate) +confirm-deletioncancel → skip-email reap → gone. Full multi-service Kaniko build DEFERRED (202-accepted contract only, mirrors live-writes deploy 202).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 sibling),DELETE confirm-deletioncancel arm (404 with no pending row).unsupported_resource_type, postgres-only; never waits for a real backup), backups/restores list, reap.POST /auth/email/startaccepted contract (Brevo-gated, delivery NOT asserted),POST /auth/githubbody-flow no-credential contract (400missing_code/ 401oauth_failed/ 503 not-configured), and a DISPOSABLE claimed-session logout round-trip (/auth/me200 → 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.Ledger
cleanup-ledger.tsgains astackentity kind:DELETE /stacks/:slugwithX-Skip-Email-Confirmationso a paid team's two-step flow doesn't strand the reap behind an undeliverable confirmation email (account cascade is the backstop).Safety (rule 24)
E2E_LIVE=1gating (whole file SKIPS in normal PR CI),assertSafeApiTarget(), ledger-before-assert + inline reap + afterAll backstop, per-service 503 skips. Brevo/Razorpay contract-only; no team-tier minting; slow services pinned off (cache hot-pool).npm run gategreen (tsc --noEmit + build + 1115 vitest pass).🤖 Generated with Claude Code