test(e2e): Batch B LIVE prod write specs (W-ONBOARD/WEBHOOK/TEAM/DEPLOY) - #184
Merged
Conversation
…DEPLOY) Batch B of the prod-coverage matrix (docs/sessions/2026-06-04/ PROD-COVERAGE-MATRIX.md §3 waves W7–W10): real-backend (LIVE) integration specs covering the authed WRITE user-flows against PRODUCTION via the minted cohort PRO account, runnable in e2e-prod.yml. New e2e/live-writes.spec.ts (mirrors live-reads.spec.ts / live-claim-deploy conventions: E2E_LIVE gating, assertSafeApiTarget, ledger-before-assert + reap rule 24, forceAnon/authed split): - W-ONBOARD: GET /start (302 → /claim?t=), GET /claim/preview (token_valid + items[] summary; 400 missing_token). /claim happy-path + 409 replay already live in live-claim-deploy — not duplicated. - W-WEBHOOK: POST /webhook/new (authed) → POST /webhook/receive/:token → GET /api/v1/webhooks/:token/requests captures method/body/header → reap. - W-TEAM: PATCH /api/v1/team (rename), GET/PATCH /team/settings (TTL policy + invalid 400), GET/PUT /team/env-policy round-trip, /team/summary, /members, /invitations, and member-mgmt (invite developer → list → revoke). ISOLATION: invite/remove/leave use a SECOND throwaway minted account so the shared primary is never removed/left. - W-DEPLOY: POST /deploy/new (202) → list/get/events → make-permanent + set-ttl + patch(private) → two-step delete (202 pending + cancel) → skip-email reap. Full Kaniko build deferred; lifecycle contract asserted. cleanup-ledger.ts: new 'e2e-account' entity kind reaps a secondary cohort account via the guarded internal cascade DELETE /internal/e2e/account/:team_id (mint-token header, from E2E_ACCOUNT_TOKEN env) so the out-of-process reaper covers it too — no DELETE /api/v1/team/:id route exists. PROD-EXEMPT (skip-with-reason, matrix §6): W-TEAM member-mgmt writes skip when E2E_ACCOUNT_TOKEN is unset (can't mint the isolated secondary); W-DEPLOY two-step delete email is Brevo-gated (sender unvalidated) — contract only. npm run gate green (tsc + build + 1115 vitest). Whole file self-skips in PR CI (E2E_LIVE!=1); 11 LIVE tests discovered under playwright.live.config.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mastermanas805
enabled auto-merge (squash)
June 5, 2026 08:27
size-limit report 📦
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 B — LIVE prod write-flow coverage
Implements Batch B (waves W7–W10) of
docs/sessions/2026-06-04/PROD-COVERAGE-MATRIX.md: real-backend (LIVE) integration specs covering the authed WRITE user-flows against production (api.instanode.dev) via the minted cohort PRO account, runnable ine2e-prod.yml.New file
e2e/live-writes.spec.tsmirrorslive-reads.spec.ts/live-claim-deploy.spec.tsconventions exactly:E2E_LIVEgating,assertSafeApiTarget, ledger-before-assert + inline reap +afterAllbackstop (rule 24), authed-minted vs forceAnon split.Routes moved to LIVE-PROD-NOW (27 route-legs)
W-ONBOARD —
GET /start(302 →/claim?t=, and bare/claimw/o token),GET /claim/preview(token_valid +items[]summary; 400missing_token). The/claimhappy-path + 409 replay already run live inlive-claim-deploy.spec.ts— not duplicated.W-WEBHOOK —
POST /webhook/new(authed) →POST /webhook/receive/:token→GET /api/v1/webhooks/:token/requestsasserts the captured request reflects the exact method/body/custom-header sent (write→inspect round-trip) → reap.W-TEAM —
PATCH /api/v1/team(rename + read-back),GET/PATCH /api/v1/team/settings(TTL policy round-trip + invalid→400),GET/PUT /api/v1/team/env-policy(round-trip, reset to permissive),GET /api/v1/team/summary,GET /api/v1/team/members,GET /api/v1/team/invitations, and member-management:POST /api/v1/team/members/invite(developer) → list →DELETE /api/v1/team/invitations/:id(revoke). Isolation: invite/remove/leave operate against a SECOND throwaway minted account (POST /internal/e2e/account) — the shared primary minted account is never removed/left.DELETE /api/v1/teamstays PROD-EXEMPT (destructive).W-DEPLOY —
POST /deploy/new(202 accepted contract: id/app_id/status/environment) →GET /api/v1/deployments+/:id+/:id/events→POST /:id/make-permanent+POST /:id/ttl+PATCH /:id(private) → two-step delete (202 pending_confirmation+DELETE /:id/confirm-deletioncancel) → final skip-emailDELETEreap → gone. Full Kaniko build is deferred (too heavy); the lifecycle contract is asserted.Reaper change
e2e/cleanup-ledger.tsadds ane2e-accountentity kind that reaps the secondary cohort account via the guarded internal cascadeDELETE /internal/e2e/account/:team_id(mint-token header fromE2E_ACCOUNT_TOKEN) — there is noDELETE /api/v1/team/:idroute, so the out-of-process reaper now covers a stranded secondary account too.Skipped-with-reason (PROD-EXEMPT, matrix §6)
E2E_ACCOUNT_TOKENis unset (can't mint the isolated secondary member without risking the primary). The owner-only team reads/patches still run on the primary.Gate
npm run gategreen (tsc + build + 1115 vitest, 0 failures). Whole file self-skips in PR CI (E2E_LIVE!=1); 11 LIVE tests discovered underplaywright.live.config.ts. Mocked suite untouched.🤖 Generated with Claude Code